Skip to content

Add RpcClient doCall/responseCall/primitiveCall overloads which include timeout #338

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

Merged

Conversation

AndreasPresthammer
Copy link

Proposed Changes

There will be use cases where a single shared timeout specified in the constructor
of the RpcClient will not match up with the expected timeout for different rpc calls
made using the rpc client. It's then convenient to be able to specifiy the timeout value
on a per method call basis. Otherwise the user of RpcClient would have to create
multiple instances of RpcClient, incurring the startup cost and having redundant
consumers of the response queue.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue #NNNN)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • [ x] I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • [x ] I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Note:
Unable to run the tests locally with 'make tests'. Getting this error:

[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute (query-test-tls-certs-dir) on project amqp-client: Execution query-test-tls-certs-dir of goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute failed: org.apache.maven.plugin.MojoExecutionException: Failed to query test TLS certs directory with command: make -C /home/andreas/code/rabbitmq-java-client/deps/rabbit --no-print-directory show-test-tls-certs-dir DEPS_DIR=/home/andreas/code/rabbitmq-java-client/deps -> [Help 1]

…de timeout

There will be use cases where a single shared timeout specified in the constructor
of the RpcClient will not match up with the expected timeout for different rpc calls
made using the rpc client. It's then convenient to be able to specifiy the timeout value
on a per method call basis. Otherwise the user of RpcClient would have to create
multiple instances of RpcClient, incurring the startup cost and having redundant
consumers of the response queue.
@pivotal-issuemaster
Copy link

@AndreasPresthammer Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@michaelklishin
Copy link
Contributor

@acogoluegnes this looks like a reasonable addition to me, even though we use RpcClient mostly as an example. WDYT?

@acogoluegnes acogoluegnes added this to the 5.2.0 milestone Jan 4, 2018
@acogoluegnes
Copy link
Contributor

@michaelklishin LGTM. @AndreasPresthammer Could you please sign the contributor licence agreement?

Copy link
Contributor

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

Please sign the CA, the rest looks good.

@AndreasPresthammer
Copy link
Author

Have to check with legal at my employer. Hopefully shouldn't take too long.

@acogoluegnes
Copy link
Contributor

@AndreasPresthammer Any news on the CA signature?

@pivotal-issuemaster
Copy link

@AndreasPresthammer Thank you for signing the Contributor License Agreement!

@AndreasPresthammer
Copy link
Author

I've signed the CLA.

@michaelklishin michaelklishin merged commit 7afa055 into rabbitmq:master Jan 17, 2018
@michaelklishin
Copy link
Contributor

@acogoluegnes looks like we can back port this all the way to 4.x?

@acogoluegnes
Copy link
Contributor

@michaelklishin Yes, looks good.

@acogoluegnes
Copy link
Contributor

@michaelklishin But only in 4.x.x-stable (4.5.0), as this is a new feature.

@acogoluegnes acogoluegnes modified the milestones: 5.2.0, 4.5.0 Jan 24, 2018
@acogoluegnes
Copy link
Contributor

Cherry-picked on 4.x.x-stable, will be available in 4.5.0.

@AndreasPresthammer AndreasPresthammer deleted the RpcClientTimeoutPerCall branch March 22, 2018 13:11
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.

4 participants