Title: fix: resolve duplicate requests caused by concurrent message sending by JooKS-me · Pull Request #333 · modelcontextprotocol/java-sdk · GitHub
Open Graph Title: fix: resolve duplicate requests caused by concurrent message sending by JooKS-me · Pull Request #333 · modelcontextprotocol/java-sdk
X Title: fix: resolve duplicate requests caused by concurrent message sending by JooKS-me · Pull Request #333 · modelcontextprotocol/java-sdk
Description: Motivation and Context
When calling the tools/call method of the same mcp async-client in parallel, we found that the client occasionally sent duplicate messages. We located that the same requestBuilder was used each time a request was made in the SDK, which was thread-unsafe.
How Has This Been Tested?
ExecutorService threadPool = Executors.newFixedThreadPool(5);
var transport = HttpClientSseClientTransport.builder("xxxxxx")
.sseEndpoint("xxxxxx")
.build();
var asyncClient = McpClient.async(transport).build();
asyncClient.initialize().block(Duration.ofSeconds(10));
Map
Open Graph Description: Motivation and Context When calling the tools/call method of the same mcp async-client in parallel, we found that the client occasionally sent duplicate messages. We located that the same requestB...
X Description: Motivation and Context When calling the tools/call method of the same mcp async-client in parallel, we found that the client occasionally sent duplicate messages. We located that the same requestB...
Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/pull/333
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c19ea5e1-0ef6-3682-9f39-1a896e3c131c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C198:1E0C3E:147D4DA:1AB73B4:6A5C59B9 |
| html-safe-nonce | 99f0a9f120f2e91c48f94817617ea15fa007e00f18b9c6a16aa6c5408d10e00f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTk4OjFFMEMzRToxNDdENERBOjFBQjczQjQ6NkE1QzU5QjkiLCJ2aXNpdG9yX2lkIjoiNTg4MjY5MjE4MzEyODgyNDI0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0e2a8cef4b74363dc1ade84ad708de17ee9e7cc394c1612698349a0e0e2eefbb |
| hovercard-subject-tag | pull_request:2606675761 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/java-sdk/pull/333/files |
| twitter:image | https://avatars.githubusercontent.com/u/62384022?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/62384022?s=400&v=4 |
| og:image:alt | Motivation and Context When calling the tools/call method of the same mcp async-client in parallel, we found that the client occasionally sent duplicate messages. We located that the same requestB... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 919609219 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 919609219 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/java-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width