-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/implement autopaho rpc #98
Merged
MattBrittan
merged 13 commits into
eclipse-paho:master
from
bkneis:feature/implement-autopaho-rpc
Aug 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2db2542
Fix router unit test for shared subscriptions
bkneis e4fda94
Add build commands to makefile and ignore bin
bkneis e818d6a
Fix paho RPC extension using context.Background
bkneis 6eedf91
Implement RPC extension for autopaho
bkneis 8780381
Add function to use the underlying client in connection manager in a …
bkneis e66bbf6
Remove .env from rpc example
bkneis 1b134ad
Remove UseClient
bkneis 10f9f48
Update RPC example with passing router through client
bkneis e095ad9
Implement PR feedback
bkneis 5549e39
Update reference to response topic in autopaho rpc extension
bkneis 3d51531
Rename to ResponseTopicFmt
bkneis ace041a
Remove redudant need to pass router
bkneis c650e72
Prevent blocking on recieving a response by using a select with context
bkneis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you are implementing the change I suggested but Sorry - I meant before the
cliCfg := cfg
. That way it will get used for every connection via:(there would then be no need to set
c.cli.Router
directly). It would make sense to do this at the top of the function (as we check/edit other parts of the config struct there = e.g. something likeSorry - it's late here so just had a really quick look so apologies if I misunderstood your intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MattBrittan I've just updated the PR, I did not realise that the cfg being passed to the NewClient would then persist the router, so there is no need to assign it explicitly as you mentioned. Please let let me know of any other changes you would like :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is actually something that should be changed (not necessarily as part of your PR). If the user passes a
nil
Router then the router will be recreated every-time we reconnect which is likely to be unexpected. I have no issues with this change (its basically just introducing a new example now). @alsm are you happy with the changes to thepaho
rpc demo androuter_test
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MattBrittan yeah I'm happy with the rpc changes. Sorry I didn't respond quicker, I'm away on vacation in Norway atm and will have intermittent connectivity for another week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alsm - I have gone ahead and merged. Suggested a couple of minor changes but they are not essential and can be handled in another PR (this one has been open long enough). I hope you have a great break!