Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodLevelListener does not handle different payloads for same topic/queue #446

Closed
timonback opened this issue Nov 10, 2023 · 0 comments
Closed
Labels
bug Something isn't working staged for release

Comments

@timonback
Copy link
Member

timonback commented Nov 10, 2023

Describe the bug
While the AbstractOperationDataScanner can handle multiple payloads for one topic/queue, the AbstractMethodLevelListenerScanner uses only the first payload and ignores the others.

When multiple payloads (via ChannelItem) are found for one topic, the payloads should be merged together using anyOf. This is implemented in MessageHelper.

Reported in #64

Dependencies and versions used

  • springwolf-amqp version 0.16.0.
  • springwolf-kafka version 0.16.0.

Code example

public class ExampleConsumer {

    private final ExampleProducer exampleProducer;

    @RabbitListener(queues = "example-queue") // same queue
    public void receiveExamplePayload(ExamplePayloadDto payload) {
        log.info("Received new message in example-queue: {}", payload.toString());
        exampleProducer.sendMessage(payload);
    }

    @RabbitListener(queues = "example-queue") // same queue
    public void receiveAnotherPayload(AnotherPayloadDto payload) {
        log.info("Received new message in another-queue: {}", payload.toString());
    }
}

Stack trace and error logs
none

@timonback timonback added bug Something isn't working good first issue Good for newcomers labels Nov 10, 2023
@timonback timonback added staged for release and removed good first issue Good for newcomers labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working staged for release
Projects
None yet
Development

No branches or pull requests

1 participant