I am trying to debug an existing service bus, It uses NServiceBus to get messages from MSMQ.
This is the Message handler in my code for handling MFNM02 messages.
public class ITKMFNM02Handler : Framework.Messaging.BusEventHandler<MFNM02>
{
protected override void HandleMessage(MFNM02 message)
{
ProcessMessages eng = new ProcessMessages();
eng.ProcessMFNM02(message);
}
}
These messages are bound to a specific queue by the below line in app.config
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Ascribe.EIE.Messages.ITK.V1" Endpoint="eiequeue@EHILP-092" />
</MessageEndpointMappings>
</UnicastBusConfig>
Now i am putting the messages directly in the "eiequeue" MSMQ using queue explorer but the messages are not picked up by the service bus.
Please tell me what i am missing
NServiceBus messages have specific formatting and simply pushing messages through Queue Explorer means that they can't get processed by NSB. You'll need to include properly formatted message body as well as expected headers in the message.
Instead of Queue Explorer, you can use one of the native send helpers from our docs website here.
Also if you configure Audit queues on your endpoint, you can have a copy of the actual messages processed with that endpoint, and then with Queue Explorer you can modify a copy of them and send them back to the original queue to get them reprocess.