简体   繁体   中英

MassTransit + azure service bus consuming custom type messages

I try to consume custome type message by my MassTransit service that subscribes to a azure service bus topic.

The messages has custom type and data of message stored is in custom properties. Here is an image of message from azure service bus explorer:

在此处输入图片说明

When trying to consume this I got :

在此处输入图片说明

MassTransit does not recognizes custom type unless it is in message header :/

Is there any way to configure endpoint so it can consume this type of message ?

Without a ContentType to differentiate the message serialization from the formats supported by MassTransit, there isn't currently a way to change it. And blank or null is not a valid content type, so that cannot be used to select it.

You would need to either add a content type, or change the message format at this point. You could submit an issue and if somebody gets around to making it possible to add an empty or unsupported serializer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM