Azure / amqpnetlite

AMQP 1.0 .NET Library
Apache License 2.0
402 stars 145 forks source link

Access Transfer object on message received / support for batching #566

Closed piotr-rojek closed 1 year ago

piotr-rojek commented 1 year ago

Hey,

I am working on Service Bus Emulator and am facing an issue where Service Bus SDK sends a batch. It is an amqp message that contains other amqp messages. This is indicated by setting Message Format field on Transfer to 0x80013700. My current problem is that I don't see how to access this information, as it seems not to be exposed.

I think it would be reasonable to extend IContainer.CreateMessage() with either the whole Transfer object, or just the Message Format value.

REF1 https://github.com/vcabbage/amqp/issues/46#issuecomment-370573896 - comment describing how batching works REF2 https://github.com/piotr-rojek/devopsifyme-sbemulator/issues/14 - issue I am trying to fix in sbemu

/Piotr

xinchen10 commented 1 year ago

Sounds reasonable. We are enabling access to the message format field on both sender and receiver sides.

xinchen10 commented 1 year ago

Message now has a Format property that sender can set. It will be made available to receivers by the library. The message format is not exposed in IContainer.CreateMessage() because the encoding is still standard AMQP message encoding. We don't support true custom message encoding (a layout different from the standard one).

piotr-rojek commented 1 year ago

Thanks @xinchen10! When do you expect this to be released?