search cancel

Adding custom headers to a Rabbit MQ VSI response

book

Article ID: 105816

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

A RabbitMQ virtual service was created from RR Pairs.

Now need to add some additional headers to the response.

How to add custom headers to the RabbitMQ VSI response?

Cause

N/A

Environment

All supported DevTest releases.

Resolution

Since the virtual service was created from request and response pairs (RR Pairs), the Recorder did not have all the header information to populate the response meta-data.


When this is the case, we could try two things:
1. do a live recording and capture the transactions with the headers we are looking for.
Then we can see how the headers are coming in the VSI.
We can copy these headers and update the previous VSI response created from RR Pairs.

2. Start the VSE Recorder and create a new VSI sending the request with the proper headers.
If we can send the request from a client application with the correct headers that will be better.
If not, then we can send a request from DevTest Rabbit MQ step and add the headers in the request side of the test step.

 


More details in the link below: Refer to section "RabbitMQ Send Receive Step" in the documentation of the DevTest release you are running.

The headers will be available in the VSI request meta-data, but we can copy the headers key from the request and paste them in the response meta-data.
The names for the headers will be the same for request and response, the value will change as required.

Additional Information

You can find more information regarding RabbitMQ Assets in the links below:

Create RabbitMQ Assets

Refer to section "RabbitMQ Assets" in the documentation of the DevTest release you are running.

Refer to section "RabbitMQ Transport Protocol" in the documentation of the DevTest release you are running.

 

Attachments

1558699775343000105816_sktwi1f5rjvs16jv8.png get_app