Skip to content

Message id matching in request-reply #54

Open
ebendal opened this issue May 7, 2022 · 0 comments
Open

Message id matching in request-reply #54

ebendal opened this issue May 7, 2022 · 0 comments

Comments

@ebendal
Copy link

ebendal commented May 7, 2022

In the RequestReplyExample the id is injected in the message being sent.

But then the matching process starts and somehow the reply should contain the id as well. Lets say that the reply has a different message format.

For example this is the message sent:

{
  "x": 101
}

And this is the message received:

{
  "y": 101
}

In the builder you provide I can set the id for the message sent by using it inside the textMessage.

amqp("name").requestReply
        .topicExchange(name = "exchange-name, routingKey = "routing-key")
        .replyExchange("queue-name")
        .textMessage("{"x":#{id}}")
        .messageId("#{id}")

The message being sent is correct and the reply message is also delivered. But this message has some random generated id:

r.t.g.a.a.RequestReply - Message sent user=1 AMQPMessageID=101
r.t.g.a.c.TrackerPool - Message received AmqpMessageID=0aee5b62-cba1-1858-abe5-386b1ba4b412 matchId=0aee5b62-cba1-1858-abe5-386b1ba4b412

How can we parse the value of y in the reply message, in order to be used by the id matching algorithm?

@ebendal ebendal changed the title Response id matching in request-reply Message id matching in request-reply May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant