Skip to content

[question] Message skipped by Centrifugo when using publication data mode and NATS/Google pub/sub async consumers #1052

@ajayaks

Description

@ajayaks

I was trying to do the below:-

  • Setup:-

  • centrifugo html client

  • centrifugo server running as docker container version 6.3.1

  • external broker like NATS/Google pub/sub for async consumer

  • Flow:-

  • Write message to external broker like via Google pub/sub topic or NATs Jetstream via native publish commands like nats pub '{"method":"publish","payload":{"channel":"testchannel1","data":{"hello":"world"}}}'

  • All of the above components are integrated and I can see in the logs that consumers and client also subscribed to the channel.

  • Centrifugo also confirms that it tries to read but always showing the below:-

  • centrifugo | {"level":"debug","channel":"testchannel1","client":"2c093829-72c4-4435-9fa2-1ca4c35ed649","user":"123722","time":"2025-10-07T18:10:07Z","message":"client subscribed to channel"}
    centrifugo | {"level":"debug","consumer":"natsasync1","subject":"centrifugo.payments","time":"2025-10-07T18:10:47Z","message":"received message from subject"}
    centrifugo | {"level":"info","consumer":"natsasync1","time":"2025-10-07T18:10:47Z","message":"no channels found, skipping message"}

any reason why its not working and what would be the solution for the same.
I m running the consumer with publication_data_mode enabled.

"publication_data_mode": {
"enabled": true
}

{
"name": "natsasync1",
"type": "nats_jetstream",
"enabled": true,
"nats_jetstream": {
"url": "nats://host.docker.internal:4222",
"stream_name": "centrifugo",
"subjects": ["centrifugo.payments"],
"durable_consumer_name": "centrifugo_payments_consumer",
"deliver_policy": "new",
"max_ack_pending": 100,
"publication_data_mode": {
"enabled": true
}
}
}
On some analysis this feature is not supported in 6.3.1 version and would be available in 6.4 or so. Is this correct? If yes then why its not mentioned on the https://centrifugal.dev/docs/server/consumers
...

Versions

Centrifugo version is 6.3.1
Client library used is centrifuge- of version
Operating system is macOS

Steps to Reproduce How can the bug be triggered?

  • run the centrifugo image v6
  • run the nats image with jetstream or can use google pub/sub as external broker as async consumer.
  • post messages to the external broker via their native commands or api calls etc ...

...

Expected behavior What output or behaviour were you expecting instead?
centrifugo should be able to read the publised messages from external broker and should be pushed to the channel -> UI websocket.

...

Code Snippets A minimum viable code snippet can be useful.

Your code here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions