簡體   English   中英

如何在Azure Service總線中推送最大長度消息

[英]How to push the Maximum length message in azure service bus

我想將消息推送到azure服務總線中,例如3 MB。 為此,我寫了:

QueueInfo queueInfo = new QueueInfo("sq-jcibe-microservice-plm-qa");
long maxSizeInMegabytes = 5120;
queueInfo.setMaxSizeInMegabytes(maxSizeInMegabytes); 
service.updateQueue(queueInfo);
service.sendQueueMessage("sq-jcibe-microservice-plm-qa", brokeredMessage);

我正在跟蹤異常。

com.microsoft.windowsazure.exception.ServiceException: com.sun.jersey.api.client.UniformInterfaceException: PUT https://sb-jcibe-microservice-qa.servicebus.windows.net/sq-jcibe-microservice-plm-qa?api-version=2013-07 returned a response status of 400 Bad Request
Response Body: <Error><Code>400</Code><Detail>SubCode=40000. For a Partitioned Queue, ordering is supported only if RequiresSession is set to true.&#xD;
Parameter name: SupportOrdering. TrackingId:59bb3ae1-95f9-45e1-8896-d0f6a9ac2be8_G3, SystemTracker:sb-jcibe-microservice-qa.servicebus.windows.net:sq-jcibe-microservice-plm-qa, Timestamp:11/30/2016 4:52:22 PM</Detail></Error> 

我並不理解這是什么意思,應該如何解決。請在這種情況下幫助我。

maxSizeInMegabytes是指隊列中消息的最大總大小,而不是單個消息的大小。 對於標准層,單個消息的大小不能超過256KB;對於高級層,單個消息的大小不能超過1MB(包括兩個標頭)。

如果您希望發送大於Maxim消息大小的消息,則必須實施聲明檢查模式( http://www.enterpriseintegrationpatterns.com/patterns/messaging/StoreInLibrary.html )或使用執行此操作的框架為了你。 實現自己意味着在將有效負載存儲為存儲Blob的過程中會有一些事情,而消息將包含Uri。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM