I am trying to send a couple of messages to a service bus queue in a batch. I am doing it by using SendBatch method of QueueClient.
I am getting a FaultException during this operation:
Batching brokered messages with distinct SessionId, PartitionKey, or MessageId is not supported for an entity with partitioning and duplicate detection enabled.
The exception's message is quite self-explanatory, and I would try to fix it, but sometimes it works, no exceptions are thrown.
So sometimes it throws an exception, sometimes it works. I do not change any settings of queues and I do not change the code.
Any ideas why it can happen?
messageidorpartitionkeyorsessionid. And, no, we are not sending in the context of an incoming message. - Alex Sikilinda