views:

86

answers:

1

Hello, I am using NServicebus with a pubsub configuration. So far it has been really awesome and quite straightforward. However, I've noticed that one of my subscriber endpoints does not pickup messages that contain HTML/XML strings. For instance I am adding a POCO object that implements IMessage and one of the string fields contains some HTML fragments. The message appears in my queue but is not picked up by endpoint. When I use the debugger to remove the HTML fragments from the string property the endpoint kicks in.

Does anyone know a) why this is happening and b) how to work around this (i assume by performing some encoding? Thanks in advance JP

[Edit] To add some more detail and respond to Udi's feedback (thanks Udi):

I am using the 4.0 build of NServicebus. The html is extremely straightforwad and looks a little like this:

<html>
<body>
<h2 class="mceNonEditable">Test Message</h2>
<p class="mceNonEditable">This is a test message</p>
</body>
</html>

[Edit2]

It appears that my issue (while still in existence) is not related to the HTML i am passing. Debugging this evening I noticed that NServicebus is picking up the messages, but intermittently (approximately 1 in 5 messages). I see all messages in my queue journal but my logic is not consistently hit.

+1  A: 

Which version of NServiceBus are you using? You can see in the Full Duplex sample that it passes XML fragments back and forth without any issue. Can you possibly include the HTML that is causing problems?

Udi Dahan
Thanks for your response Udi. I have edited my post. I will also check the Full Duplex sample to make sure this isn't an ID10T error...
JP
I've taken that html and put it into the full duplex sample and it works just fine.
Udi Dahan
@JP, @Udi: We had this exact same problem with the NSB serializer in an old version (pre-1.9). We worked around it by swapping it out and using the DataContractSerializer instead.
Damian Powell
@Damian, there were indeed issues in older versions. Version 2.0 RTM, which is the official version, does not have these issues.
Udi Dahan