smallrye-reactive-messaging icon indicating copy to clipboard operation
smallrye-reactive-messaging copied to clipboard

Pubsub support and publish timeouts

Open devinsaini opened this issue 3 months ago • 2 comments

I see the pubsub connector isn't being maintained currently as per issue comments a couple years back. Are there any plans regarding it in the future? I have a problem with Pubsub connector. MutinyEmitter.sendMessage() returns Uni<Void> but it doesn't complete. The message is posted successfully on the topic though.

Code Example:

@Channel("timer-trigger")
MutinyEmitter<String> emitter;

@GET
@Path("/trigger")
public Uni<String> trigger() {
    return emitter.sendMessage(Message.of("sync"))
            .ifNoItem().after(Duration.ofSeconds(15)).fail()
            .onItem().transform(v -> "success");
}
gcp-pubsub-project-id=project_id
mp.messaging.connector.smallrye-gcp-pubsub.use-admin-client=false

# Configuration for the incoming channel "refresh-timer"
mp.messaging.incoming.timer-event.connector=smallrye-gcp-pubsub
mp.messaging.incoming.timer-event.subscription=timer-sub

# rest based trigger for testing
mp.messaging.outgoing.timer-trigger.connector=smallrye-gcp-pubsub
mp.messaging.outgoing.timer-trigger.topic=timer

mp.messaging.outgoing.tenant-refresh-out.connector=smallrye-gcp-pubsub
mp.messaging.outgoing.tenant-refresh-out.topic=tenant

mp.messaging.incoming.tenant-refresh-in.connector=smallrye-gcp-pubsub
mp.messaging.incoming.tenant-refresh-in.subscription=tenant-sub

Expected Behavior:

  • The Uni<Void> returned by sendMessage() should complete when the message is successfully sent to the GCP topic
  • Uni<Void> should not wait indefinitely.
  • The above code sample should return success

Actual Behaviour:

  • emitter.sendMessage() returns a Uni that doesn't finish.
  • The code example above shows TimeOut error.
  • The message is posted successfully on the Pubsub topic

devinsaini avatar Sep 27 '25 22:09 devinsaini