You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature related to a problem? Please describe.
I tried to send a custom serialized message satellite queue but this is just not possible. You can obtain a IMessageDispatcher but that does not batch messages as part of an incoming message context.
Describe the requested feature
I my use case I'm not that interested in needing to limit the headers. I'm fine with the headers as long as additional headers can still be added via for example SendOptions and its only specific to just send binary data:
Having these APIs would allow to very efficiently send binary payloads that do not require serialization. No point to serialize a binary in a message with a single byte[] property to JSON as Base64 encoded. Serializer overhead and payload bloat
It allows to send files that fit the transports its maximum message payload. In my case its not needed but we could even apply the claim check pattern via databus if the binary payload does not fit the transport its message size limit.
Receiving
Such payloads can be processed via RAW endpoints.
It would also be nice if such payloads could be received via handlers. This is just some pseudo code but not really required.
interfaceIHandleBinaryMessage{
Task Handle(ReadOnlyMemory<byte>body,MessageContextcontext);}classEnclosedMessageTypeAttribute:Attribute{publicEnclosedMessageTypeAttribute(stringname){}publicEnclosedMessageTypeAttribute(Typetype){}}[MapToEnclosedMessageType("MyMessageTypeKey")]public Task Handle : IHandleBinaryMessage
{publicasync Task Handle(ReadOnlyMemory<byte>body,MessageContextcontext){await File.WriteAllBytes("myfile.txt", body);}}// or map to an existing type![MapToEnclosedMessageType(typeof(MySpecialMessage))]public Task Handle : IHandleBinaryMessage
{publicasync Task Handle(ReadOnlyMemory<byte>body,MessageContextcontext){await File.WriteAllBytes("myfile.txt", body);}}
Describe alternatives you've considered
Transport operations
Sending ReadOnlyMemory<byte> would pretty much be achieved if the API could allow sending TransportOperation or maybe a bit less heavy OutgoingMessage:
Is your feature related to a problem? Please describe.
I tried to send a custom serialized message satellite queue but this is just not possible. You can obtain a
IMessageDispatcher
but that does not batch messages as part of an incoming message context.Describe the requested feature
I my use case I'm not that interested in needing to limit the headers. I'm fine with the headers as long as additional headers can still be added via for example
SendOptions
and its only specific to just send binary data:Having these APIs would allow to very efficiently send binary payloads that do not require serialization. No point to serialize a binary in a message with a single
byte[]
property to JSON as Base64 encoded. Serializer overhead and payload bloatSend
ReadOnlyMemory<byte>
:Send
Stream
:Claim check pattern
It allows to send files that fit the transports its maximum message payload. In my case its not needed but we could even apply the claim check pattern via databus if the binary payload does not fit the transport its message size limit.
Receiving
Such payloads can be processed via RAW endpoints.
It would also be nice if such payloads could be received via handlers. This is just some pseudo code but not really required.
Describe alternatives you've considered
Transport operations
Sending
ReadOnlyMemory<byte>
would pretty much be achieved if the API could allow sendingTransportOperation
or maybe a bit less heavyOutgoingMessage
:A spike exists that does a bit of RAW handling:
Additional Context
No response
The text was updated successfully, but these errors were encountered: