HFFZZZ opened a new issue, #7239:
URL: https://github.com/apache/rocketmq/issues/7239

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   CentOS8
   
   ### RocketMQ version
   
   rocketmq5.1.3
   
   ### JDK Version
   
   1.8
   
   ### Describe the Bug
   
   Why do I have no problem executing quick start environment inside docker 
when I start docker, but I use java client to connect, there will be this 
exception, ask for help
   
   error
   Caused by: java .util. concurrent. Cancellation Exception: Task was 
cancelled.
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1543)
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:586)
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
   at org. apache .rocketmq. client. java. impl.Client Impl .start 
Up(ClientImpl.java:188)
   at 
org.apache.rocketmq.client.java.impl.consumer.PushConsumerImpl.startUp(PushConsumerImpl.java:161)
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
   at 
org.apache.rocketmq.shaded.com.google.common.util.concurrent.Callables.lambda$threadRenaming$3(Callables.java:103)
   
   ### Steps to Reproduce
   
   java Client
   public static void main(String[] args) throws ClientException, IOException, 
InterruptedException {
   final ClientServiceProvider provider = ClientServiceProvider.loadService();
   
   String endpoints = "xx.xx.xx.xx:8081";
   ClientConfiguration clientConfiguration = ClientConfiguration.newBuilder()
   .setEndpoints(endpoints)
   .build();
   
   String tag = "*";
   FilterExpression filterExpression = new FilterExpression(tag, 
FilterExpressionType.TAG);
   
   String consumerGroup = "YourConsumerGroup";
   
   String topic = "TestTopic";
   
   PushConsumer pushConsumer = provider.newPushConsumerBuilder()
   .setClientConfiguration(clientConfiguration)
   
   .setConsumerGroup(consumerGroup)
   
   .setSubscriptionExpressions(Collections.singletonMap(topic, 
filterExpression))
   .setMessageListener(new MessageListener() {
   @OverRide
   public ConsumeResult consume(MessageView messageView) {
   System.out.println(messageView.toString());
   ByteBuffer body = messageView.getBody();
   String strbody =new String(body.array());
   System.out.println(strbody);
   //return ConsumeResult.SUCCESS;
   return null;
   }
   })
   .build();
   //Thread.sleep(Long.MAX_VALUE);
   
   // pushConsumer.close();
   }
   
   ### What Did You Expect to See?
   
   Does anyone know what the mistake was
   
   ### What Did You See Instead?
   
   Caused by: java.util.concurrent.CancellationException: Task was cancelled.
   
   ### Additional Context
   
   none


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

Reply via email to