mxsm commented on issue #3271:
URL: 
https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445625034

   > I couldn't reproduced the scene, and test is success. @mxsm
   
   pull the latest code from master. start runtime and use this test code:
   ```java
   public class HTTP {
       public static void main(String[] args) throws Exception {
           EventMeshHttpClientConfig eventMeshClientConfig = 
EventMeshHttpClientConfig.builder()
               .liteEventMeshAddr("192.168.1.7:10105")
               .producerGroup("TEST_PRODUCER_GROUP")
               .env("DEV")
               .idc("idc")
               .ip(IPUtils.getLocalAddress())
               .sys("1234")
               .pid(String.valueOf(ThreadUtils.getPID()))
               .userName("eventmesh")
               .password("password")
               .build();
           /* ... */
           EventMeshHttpProducer eventMeshHttpProducer = new 
EventMeshHttpProducer(eventMeshClientConfig);
           Map<String, String> content = new HashMap<>();
           content.put("content", "testAsyncMessage");
   
           CloudEvent event = CloudEventBuilder.v1()
               .withId(UUID.randomUUID().toString())
               .withSubject("eventmesh-async-topic")
               .withSource(URI.create("/"))
               .withDataContentType("application/cloudevents+json")
               .withType(EventMeshCommon.CLOUD_EVENTS_PROTOCOL_NAME)
               
.withData(JsonUtils.toJSONString(content).getBytes(StandardCharsets.UTF_8))
               .withExtension(Constants.EVENTMESH_MESSAGE_CONST_TTL, 
String.valueOf(4 * 1000))
               .build();
           eventMeshHttpProducer.publish(event);
       }
   }
   ```


-- 
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]

Reply via email to