braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 98 forks source link

Can BraintreeGateway be reused and is it thread safe? #65

Closed loodakrawa closed 6 years ago

loodakrawa commented 6 years ago

Hi,

This is not an issue report - just a question as I couldn't find this info in the docs.

Is the BraintreeGateway designed to be reused for multiple requests and if yes, is it thread-safe?

Thanks

crookedneighbor commented 6 years ago

It is fine to use it for multiple requests, but try to keep it to below 25 concurrent requests. Running too many requests at once can result in rate limiting (especially in Sandbox, which has fewer resources than Production)

Reach out to our support team if you have further questions about this.