mistyzyq commented on issue #2457:
URL:
https://github.com/apache/incubator-eventmesh/issues/2457#issuecomment-1336363313
The following code is modified by me with reference to the async case, and
it works fine.
org.apache.eventmesh.http.demo.pub.eventmeshmessage.SyncRequestInstance#main()
```
EventMeshHttpClientConfig eventMeshClientConfig =
EventMeshHttpClientConfig.builder()
.liteEventMeshAddr(eventMeshIPPort)
.producerGroup(ExampleConstants.DEFAULT_EVENTMESH_TEST_PRODUCER_GROUP)
.env("env")
.idc("idc")
.ip(IPUtils.getLocalAddress())
.sys("1234")
.pid(String.valueOf(ThreadUtils.getPID()))
.userName("eventmesh")
.password("pass")
.build();
eventMeshHttpProducer = new
EventMeshHttpProducer(eventMeshClientConfig);
long startTime = System.currentTimeMillis();
EventMeshMessage eventMeshMessage = EventMeshMessage.builder()
.bizSeqNo(RandomStringUtils.generateNum(30))
.content("contentStr with special protocal")
.topic(topic)
.uniqueId(RandomStringUtils.generateNum(30))
.build()
.addProp(Constants.EVENTMESH_MESSAGE_CONST_TTL,
String.valueOf(4 * 1000));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]