Conversation
…aultIncomingMessage Updated CoreNatsSubscriber and JetStreamSubscriber to allow messages without the 'message-type' header if the endpoint has a MessageType defined (configured via DefaultIncomingMessage).
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request updates the message filtering logic in CoreNatsSubscriber and JetStreamSubscriber to allow processing messages without a 'message-type' header when the endpoint has a pre-defined MessageType. Reviewers suggested refactoring this duplicated logic into a shared method within NatsEndpoint, using constants for header keys, and simplifying the code using null-conditional operators.
…aultIncomingMessage - Updated CoreNatsSubscriber to allow messages without 'message-type' header if DefaultIncomingMessage is configured. - Updated JetStreamSubscriber to allow messages without 'message-type' header if DefaultIncomingMessage is configured. - Added debug logging for skipped messages in JetStreamSubscriber (consistent with CoreNatsSubscriber). - Added regression test DefaultIncomingMessageTests. - Verified consistency with RabbitMQ transport behavior.
…aultIncomingMessage - Updated CoreNatsSubscriber and JetStreamSubscriber to allow messages without 'message-type' header if the endpoint has a defined MessageType (configured via DefaultIncomingMessage). - Added debug logging to JetStreamSubscriber for skipped messages, consistent with CoreNatsSubscriber. - Added a regression test in NatsTransportIntegrationTests.cs verifying that raw NATS messages without headers are correctly received when a default message type is set. - Ensured consistency with other transports like RabbitMQ which do not have this restriction.
This PR fixes an issue where NATS messages were being dropped if they lacked a 'message-type' header, even when the endpoint was configured with a
DefaultIncomingMessage.The fix modifies
CoreNatsSubscriberandJetStreamSubscriberto only skip messages without the 'message-type' header if noMessageType(default type) is configured for the endpoint. This allows Wolverine to correctly process raw NATS messages from external systems when a default type is provided.PR created automatically by Jules for task 13281418315348865178 started by @frankvdb7