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

Bi-direction subscription #1124

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artursouza
Copy link
Member

@artursouza artursouza commented Sep 12, 2024

Description

Bi-directional subscription.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1072

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Artur Souza <[email protected]>
@@ -145,6 +145,12 @@
<version>${dapr.sdk.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for the tests to work on IntelliJ. Not sure why it is like that in master branch.


};
try(var subscription = previewClient.subscribe(PUBSUB_NAME, TOPIC_NAME, listener, TypeRef.STRING)) {
callWithRetry(() -> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grpc stream is being cancelled right away and no message is delivered beyond the first one. No idea why:

Published message: 'This is message #9 on topic stream-topic' to topic 'stream-topic' pubsub_name 'messagebus'
Starting subscription for stream-topic
Checking results for topic stream-topic
time="2024-09-11T16:43:39.455058-07:00" level=info msg="Subscribing to pubsub 'messagebus' topic 'stream-topic'" app_id=pubsubstreamit instance=Arturs-Laptop.local scope=dapr.runtime.pubsub.streamer type=log ver=1.14.2
time="2024-09-11T16:43:39.46075-07:00" level=info msg="Unsubscribed from pubsub 'messagebus' topic 'stream-topic'" app_id=pubsubstreamit instance=Arturs-Laptop.local scope=dapr.runtime.pubsub.streamer type=log ver=1.14.2
io.dapr.exceptions.DaprException: CANCELLED: Failed to read message.
Checking results for topic stream-topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Streaming Subscription Support
1 participant