How to add header details in kafka virtual service response
search cancel

How to add header details in kafka virtual service response

book

Article ID: 401255

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

We created a kafka virtual service by recording & with Request/response pair details. In kafka request payload, we are sending header details and we could see from inspection view that virtual service is accepting these header details. But while sending the response, these headers are ignored and virtual service is not adding these headers in response payload.

    Is there any way to send headers in response payload? We checked the kafka step created in vsm file, but there is no option to add header details in response.

Environment

Devtest: 10.8

Resolution

We can add the header details in response payload as part of response "meta data" details as key-value pairs. 

To add   "region":"NAM" &   "CID":"123456" as response payload headers, add key as "msg.Header.region" with value "NAM" and another key with name as "mg.Header.CID" with value as "123456"