Open wokket opened 7 years ago
@nyusti Sorry to chase mate but I'm keen to get this sorted! Do you expect this library to be production ready or is it work in progress?
Hi,
Sorry for the late answer. Yes it should be production ready, but I only used it with Azure Service Bus yet. Yes, looks like the encryption metadata is missing. Let me check this today.
Made some tests with Azure Service Bus and it looks okay to me. Are you using RabbitMQ?
Yes, we're using RabbitMQ.
Yes, looks like this is a limitation or an issue in the MassTransit. The InMemoryBus implementation won't work as well. I assumed that if it's working for Azure Service Bus it should work for the others as well. I'll report this issue to the MassTransit guys.
I've tried to contact the MassTransit guys, but did not get any usable reply so I opened an issue on their side. Until this is solved, this code will only work for Azure Service Bus. Sorry for that.
So from what I can see, the headers are actually present if it's a string:
In memory doesn't really have a transport, so there are no transport headers, so it isn't a surprise they don't work there. Your in-memory unit tests shouldn't use your serializer, or I can try to add transport header support to the in-memory fabric that is in the develop
branch.
The value is a JSON string. I've added a test around it using RabbitMQ and could reproduce the problem.
I've set up a local RabbitMQ instance, and published a sample message, like in the other tests. In the receive context six headers were visible but not mine.
I saw a test, where the header is set when publishing. Is this working? https://github.com/MassTransit/MassTransit/blob/develop/src/MassTransit.RabbitMqTransport.Tests/Encrypted_Specs.cs#L46
G'day mate,
I've just tried to use your library and it's working great for serialization 👍.
I wired up deserialization and received JSON errors due to the encryptiondata header not making it onto the bus:
Before I start chasing up the MassTransit team about why the header isn't making it from the SendContext onto the message would you mind confirming that this library is meant to be production ready. and that you're using it in anger?
Thanks, Tim