Closed WayneDT closed 1 year ago
Hey @WayneDT
This is already handled in the way that you proposed :) The only difference is that session-id is being sent in AMQP as a property called group-id, visible in rabbit as x-sb-group-id. Group ID is also sent back to the receiver.
But as you noted, this is not a proper implementation of sessions, as it barely passes values back and forth.
/Piotr
I am having trouble actually receiving messages with sessions. The code I am using is from the Microsoft SDK samples (https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicebus/service-bus/samples/v7/javascript/session.js)
It fails when const receiver = await sbClient.acceptSession(queueName, sessionId);
The error I get is TypeError: Cannot read properties of undefined (reading '4')
if you want to run this follow the instructions i put on issue #9 and then just paste the code from the same above into the index.js
This is expected, as both transaction and session support is not implemented ATM (see https://github.com/piotr-rojek/devopsifyme-sbemulator#not-supported-features). I cannot make any promises to the timeline, but some kind of session support will be implemented in near future.
/Piotr
In the code there does not seem to be any support for session Id.
Looking at the
RabbitMqMapper.cs
from line 99.I am assuming this is because RabbitMQ doesn't have an exact parallel.
Proposal
Is it possible to add a mapping that will pull the session id from the Azure Servicebus message and set it as a Property on the RabbitMq message
then when reading the message you can look for that property and set the session id again
Our messages look like.