通过 REST api 向 Azure 服务总线 queue 发送消息时出现 405 错误
405 Error while sending message to Azure Service bus queue via REST api
我正在尝试通过 POSTMAN 使用 REST api 向 Azure ServiceBus queue 发送消息,但是当我触发消息时出现以下错误:-
<Code>405</Code>
<Detail>The SessionId was not set on a message, and it cannot be sent to the entity. Entities that have session support enabled can only receive messages that have the SessionId set to a valid value. TrackingId:aew3fd4-9721d-455456-df56-453345, SystemTracker:SampleNamespace:Queue:queue_name, Timestamp:2019-09-30T10:27:09</Detail>
有人能告诉我如何在 header 选项卡中添加 sessionId 以及要设置什么吗?我尝试了一些方法,但没有用。
谢谢,
楼陀罗
sessionId 必须在 broker_properties header
中定义
BrokerProperties: { “SessionId”: “{Your session ID}”, “MessageId”: “{701332E1-B37B-4D29-AA0A-E367906C206E}”, “TimeToLive” : 90, “CorrelationId”: “{701332F3-B37B-4D29-AA0A-E367906C206E}”, “SequenceNumber“ : 12345, “DeliveryCount“ : 2, “To“ : "http://contoso.com“, “ReplyTo“ : "http://fabrikam.com“, "EnqueuedTimeUtc“ : " Sun, 06 Nov 1994 08:49:37 GMT“, "ScheduledEnqueueTimeUtc“ : " Sun, 06 Nov 1994 08:49:37 GMT“}
我正在尝试通过 POSTMAN 使用 REST api 向 Azure ServiceBus queue 发送消息,但是当我触发消息时出现以下错误:-
<Code>405</Code>
<Detail>The SessionId was not set on a message, and it cannot be sent to the entity. Entities that have session support enabled can only receive messages that have the SessionId set to a valid value. TrackingId:aew3fd4-9721d-455456-df56-453345, SystemTracker:SampleNamespace:Queue:queue_name, Timestamp:2019-09-30T10:27:09</Detail>
谢谢, 楼陀罗
sessionId 必须在 broker_properties header
中定义BrokerProperties: { “SessionId”: “{Your session ID}”, “MessageId”: “{701332E1-B37B-4D29-AA0A-E367906C206E}”, “TimeToLive” : 90, “CorrelationId”: “{701332F3-B37B-4D29-AA0A-E367906C206E}”, “SequenceNumber“ : 12345, “DeliveryCount“ : 2, “To“ : "http://contoso.com“, “ReplyTo“ : "http://fabrikam.com“, "EnqueuedTimeUtc“ : " Sun, 06 Nov 1994 08:49:37 GMT“, "ScheduledEnqueueTimeUtc“ : " Sun, 06 Nov 1994 08:49:37 GMT“}