我有一个 NServiceBus 传奇,它试图使用 Raven 超时持久器来安排超时,但是当它尝试时它会收到此错误:
NServiceBus.Unicast.Transport.Transactional.TransactionalTransport [(null)] <(null)> - Failed raising 'transport message received' event for message with ID=90dadfbd-9eb6-4558-96ec-37edb642330a\17275422
System.InvalidOperationException: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Request Too Long</h2>
<hr><p>HTTP Error 400. The size of the request headers is too long.</p>
</BODY></HTML>
---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse)
--- End of inner exception stack trace ---
at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func`1 getResponse)
at Raven.Client.Connection.HttpJsonRequest.ReadResponseString()
at Raven.Client.Connection.HttpJsonRequest.ReadResponseJson()
at Raven.Client.Connection.ServerClient.DirectPut(RavenJObject metadata, String key, Nullable`1 etag, RavenJObject document, String operationUrl)
at Raven.Client.Connection.ServerClient.<>c__DisplayClass10.<Put>b__f(String u)
at Raven.Client.Connection.ServerClient.TryOperation[T](Func`2 operation, String operationUrl, Boolean avoidThrowing, T& result)
at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String method, Func`2 operation)
at Raven.Client.Connection.ServerClient.Put(String key, Nullable`1 etag, RavenJObject document, RavenJObject metadata)
at Raven.Client.Document.HiLoKeyGenerator.PutDocument(JsonDocument document)
at Raven.Client.Document.HiLoKeyGenerator.GetNextMax()
at Raven.Client.Document.HiLoKeyGenerator.NextId()
at Raven.Client.Document.HiLoKeyGenerator.GenerateDocumentKey(DocumentConvention convention, Object entity)
at Raven.Client.Document.MultiTypeHiLoKeyGenerator.GenerateDocumentKey(DocumentConvention conventions, Object entity)
at Raven.Client.Document.DocumentStore.<>c__DisplayClass1.<Initialize>b__0(Object entity)
at Raven.Client.Document.InMemoryDocumentSessionOperations.GetOrGenerateDocumentKey(Object entity)
at Raven.Client.Document.InMemoryDocumentSessionOperations.StoreInternal(Object entity, Nullable`1 etag, String id)
at Raven.Client.Document.InMemoryDocumentSessionOperations.Store(Object entity)
at NServiceBus.Timeout.Hosting.Windows.Persistence.RavenTimeoutPersistence.Add(TimeoutData timeout)
at NServiceBus.Timeout.Core.TimeoutTransportMessageHandler.Handle(TransportMessage message)
at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTransportMessageReceived(TransportMessage msg)
我已经重新启动了 Raven 服务和 nservicebus 主机。我已经尝试重新创建这个传奇,但它仍然会发生。
正在安排的超时状态消息很小:
<Messages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.net/Invoicing.Service">
<IPartPaymentTimeout>
<Amount>10.00</Amount>
<OriginalTransactionTimeUtc>2013-01-14T05:49:04.8180938Z</OriginalTransactionTimeUtc>
<PaymentNumber>7</PaymentNumber>
<Id>123456</Id>
<InvoiceNumber>1234567/34567</InvoiceNumber>
</IPartPaymentTimeout>
</Messages>