Repository navigation
Conversation
- Add python-direct-requestor-blocking-sample.py (publish_await_response with a positive reply timeout and one retry on PubSubTimeoutError), python-direct-requestor-sample.py (non-blocking publish() returning a Future per request, then collected), and python-direct-replier-sample.py (receive_async with a RequestMessageHandler, a None-replier guard, and reply()) - Direct only: the Python API has no guaranteed request-reply, so there is no counterpart to the JCSMP guaranteed requestor and replier - Follow the EBP-3103 conventions: shared connection-config helper, listeners registered before connect(), 3000 ms reconnect interval, SIGINT/SIGTERM shutdown, bounded terminate(), exit code 1 on failure and 0 on a shutdown signal - Document that the request-reply builders have no back-pressure setting and that their from_properties() applies no property - Rename the four EBP-3103 samples to drop the -async suffix: a -blocking suffix now marks only a variant that waits for the broker's answer, matching the SolaceSamples naming - Correct a stale guaranteed publisher comment that said the direct publisher pauses during a reconnect - Verified against solace-pubsubplus 1.11.0: pyflakes clean, a no-broker smoke test, and live round trips from both requestors to the replier
aelsammak
marked this pull request as ready for review
September 28, 2026 16:14
mtite-sol
approved these changes
Sep 29, 2026
mtite-sol
left a comment
There was a problem hiding this comment.
Changes LGTM! Might be worth considering adding automated testing in the future to cover at least what you mentioned in your smoke tests. This can give us more confidence that samples still work when updating code / updating api version. Not needed for this PR though!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this change?
How is this accomplished?
python-direct-requestor-blocking-sample.py: onepublish_await_response()with a positive 3000 ms reply timeout and a single retry onPubSubTimeoutError(JCSMP parity), then self-exit.python-direct-requestor-sample.py: five non-blockingpublish()calls that each return aconcurrent.futures.Future, so the requests are in flight together, then each Future is collected for its reply or its timeout.python-direct-replier-sample.py:RequestReplyMessageReceiverbuilt with the request topic subscription,receive_async()with aRequestMessageHandlerthat guards on aNonereplier, echoesAPPLICATION_MESSAGE_ID, and catches a failedreply().setup_solace/connect_solace/ teardown with a populated state dataclass, service listeners beforeconnect(), 3000 ms reconnect interval, SIGINT/SIGTERM shutdown, boundedterminate(). Exit code is 0 on success or a shutdown signal and 1 on a missing reply or a failure.-async(for examplepython-direct-publisher-sample.py), including the "Copied into a generated project as" docstring line.Anything reviews should focus on/be aware of?
from_properties()applies no property, so these samples carry no buffer capacity constant, unlike the EBP-3103 samples. The comments say so.publish_await_response()andReplier.reply()accept only anOutboundMessage, so these samples use the message builder where the direct publisher is builderless.-blockingmeans the call waits for the broker's answer (a reply or an ACK), not a back-pressure wait. A futurepublish_await_acknowledgement()sample would bepython-guaranteed-publisher-blocking-sample.py.SKILL.md, mode files, and evals are out of scope), so trigger and output evals were not run.Verification (solace-pubsubplus 1.11.0, Python 3.13, local broker):