Comparing with Microsoft.ServiceBus.Messaging.BrokeredMessage

May 18, 2015 at 1:09 PM
I am trying to do mapping between both classes Message and BrokeredMessage(Provided by ServiceBus) and some properties don't match:
  • EnqueuedSequenceNumber
  • EnqueuedTimeUtc
  • ForcePersistence
  • IsBodyConsumed
  • ReplyToSessionId
  • ScheduledEnqueueTimeUtc
  • SequenceNumber
  • SessionId
  • Size
  • State
  • ViaPartitionKey
is there work around for using the stated properties?
Coordinator
May 20, 2015 at 5:16 PM
Depending on how they are mapped, BrokeredMessage properties can be categorized as follows:
  1. mapped directly to the standard AMQP message property if there is one.
  2. mapped to an extension property in the message annotation section.
  3. mapping not needed because they are not transferred over network.
  4. not supported in AMQP. they are only supported by the NetMessaging protocol.
Category 1:
SessionId <-> amqp.properties.group-id
ReplyToSessionId <-> amqp.properties.reply-to-group-id

Category 2:
EnqueuedTimeUtc <-> amqp.message-annotations["x-opt-enqueued-time"]
ScheduledEnqueueTimeUtc <-> amqp.message-annotations["x-opt-scheduled-enqueue-time"]
SequenceNumber <-> amqp.message-annotations["x-opt-sequence-number"]

Category 3:
IsBodyConsumed
Size
State

Category 4:
ViaPartitionKey
EnqueuedSequenceNumber
ForcePersistence
May 27, 2015 at 12:40 AM
Thanks xinchen that's was helpful