davsclaus opened a new pull request, #30351: URL: https://github.com/apache/camel/pull/30351
[CAMEL-27192](https://issues.apache.org/jira/browse/CAMEL-27192) ## Changes - **Publisher cache per endpoint.** `GooglePubsubComponent` cached one `Publisher` per topic name, but `buildPublisher` configures it from the endpoint: the credentials (`authenticate`, `serviceAccountKey` and the other login options), `pubsubEndpoint`, `messageOrderingEnabled` and `retry`. A second endpoint publishing to the same topic with other settings got the publisher of the first one. The cache key is now the topic plus the endpoint URI, which carries all of those options. - **Cache size and timeout are used.** The cache was built in a field initializer, before `publisherCacheSize` and `publisherCacheTimeout` were set, so both options had no effect. It is now built in `doInit`. - **resumePublish after a failed ordered publish.** With ordering enabled, the Google publisher pauses an ordering key when a publish with that key fails, so every later publish with that key failed at once, including the redeliveries of the error handler. The producer now calls `Publisher.resumePublish(orderingKey)` when the publish fails, and rethrows the failure. ## Tests - `PubsubPublisherCacheTest`: endpoints on the same topic with other settings get their own publisher and the same endpoint shares one; `publisherCacheSize` evicts; a failed publish with an ordering key resumes the key when ordering is enabled, and not otherwise. Three of the four fail on `main`. - The camel-google-pubsub tests pass (1050). _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
