Skip to content

Add postgres message queue (pgmq) publisher and consumer#1654

Merged
doxthree merged 1 commit into
masterfrom
feature/add-pgmq
May 18, 2026
Merged

Add postgres message queue (pgmq) publisher and consumer#1654
doxthree merged 1 commit into
masterfrom
feature/add-pgmq

Conversation

@pstadermann
Copy link
Copy Markdown

No description provided.

@pstadermann pstadermann marked this pull request as draft April 28, 2026 08:23
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqPublisherOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqPublisherOptions.cs Outdated
Comment thread test/Motor.Extensions.Hosting.PgMq_IntegrationTest/PgMqIntegrationTests.cs Outdated
Comment thread test/Motor.Extensions.Hosting.PgMq_IntegrationTest/PgMqIntegrationTests.cs Outdated
Comment thread test/Motor.Extensions.Hosting.PgMq_IntegrationTest/PgMqIntegrationTests.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
@prskr
Copy link
Copy Markdown
Contributor

prskr commented Apr 29, 2026

I think you're missing a PgMqHostBuilderExtensions to configure your consumer's and publishers with the corresponding builders, no?

Comment thread test/Motor.Extensions.Hosting.PgMq_IntegrationTest/PostgresFixture.cs Outdated
Comment thread src/Motor.Extensions.Hosting.CloudEvents/MotorCloudEvent.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqConsumerOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/LogEvents.cs
@doxthree doxthree force-pushed the feature/add-pgmq branch from d99d32a to dd9d745 Compare May 11, 2026 09:06
@GermanCoding GermanCoding force-pushed the feature/add-pgmq branch 2 times, most recently from a15f820 to 98bf702 Compare May 12, 2026 13:16
@GermanCoding GermanCoding marked this pull request as ready for review May 12, 2026 13:20
@doxthree
Copy link
Copy Markdown
Contributor

doxthree commented May 13, 2026

I think you're missing a PgMqHostBuilderExtensions to configure your consumer's and publishers with the corresponding builders, no?

Extension is implemented

Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs
Comment thread test/Motor.Extensions.Hosting.PgMq_IntegrationTest/PgMqIntegrationTests.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs
Comment thread src/Motor.Extensions.Hosting.CloudEvents/MotorCloudEvent.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqPublisherOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgMqPublisherOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgOptions.cs
Comment thread src/Motor.Extensions.Hosting.PgMq/Options/PgOptions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/LogEvents.cs
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqHostBuilderExtensions.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
Comment thread src/Motor.Extensions.Hosting.PgMq/PgMqMessageConsumer.cs Outdated
await producer.StopAsync();
}

[Fact(Timeout = 50000)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: why is this timeout 50s when the CancellationTokenSource has a deadline after 5s?

Copy link
Copy Markdown

@GermanCoding GermanCoding May 15, 2026

Choose a reason for hiding this comment

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

The tests use a Postgres Fixture with a testcontainer. This needs to be setup once for all tests, but this is slow: We tested this to take up to ~30s for the first test. As the test order is not guaranteed, any test may need to set up this fixture, thus requiring a rather long timeout.

(The extra ~20s are because CI is sometimes slower than a local machine, so extra headroom)

Copy link
Copy Markdown
Contributor

@prskr prskr left a comment

Choose a reason for hiding this comment

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

LGTM, a few nits and questions, but nothing urgent that would block the merge

@GermanCoding GermanCoding changed the title Feature/add pgmq Add postgres message queue (pgmq) publisher and consumer May 15, 2026
@Alex-Kum Alex-Kum force-pushed the feature/add-pgmq branch 3 times, most recently from f66f243 to 7838347 Compare May 18, 2026 12:34
@doxthree doxthree added this pull request to the merge queue May 18, 2026
Merged via the queue into master with commit 59a042e May 18, 2026
8 checks passed
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.

7 participants