rebus-org / Rebus.PostgreSql

:bus: PostgreSQL persistence for Rebus
https://mookid.dk/category/rebus
Other
18 stars 20 forks source link

PubSub messages aren't delivered #21

Closed JonCanning closed 3 years ago

JonCanning commented 3 years ago

I've been playing around with Rebus, trying to set up pub sub with dead lettering and a SQL back end. It's written in F# but it's a simple example:

https://github.com/JonCanning/rebuspostgrespubsub

The same code works for MySql and SqlServer, but for Postgres the message stays in the publisher table and is never delivered to the subscriber.

I'm using a docker instance of postgres:

docker run --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres

Can you help?

mookid8000 commented 3 years ago

The Postgres transport is different from the other transports, because it uses a single table for all messages and not the table-per-queue model used by the MSSQL and MySQL transports.

If you pass something like "Messages" as the table name argument in the UsePostgreSql(...) lines, I bet it will make a difference 🙂

JonCanning commented 3 years ago

Perfect, thankyou