You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/09/26 09:36:36 UTC

[GitHub] [rocketmq-spring] MartinDai edited a comment on issue #150: [ISSUE #81]fix RocketMQTemplate.syncSend collection type method signature

MartinDai edited a comment on issue #150: [ISSUE #81]fix RocketMQTemplate.syncSend collection type method signature
URL: https://github.com/apache/rocketmq-spring/pull/150#issuecomment-535422064
 
 
   > > > Hi @MartinDai, do you verified in your environment? I tried your pr, but still the `syncSend(String destination, Object payload, long timeout)` method was called.
   > > 
   > > 
   > > I verified that it is ok.Can you provide your invoke this method's code segment?
   > 
   > OKay, It's success now. So why not just change the method signature to `SendResult syncSend(String destination, Collection<Message> messages, long timeout)`?
   
   Because ```SendResult syncSend(String destination, Collection<Message> messages, long timeout)``` means the ```messages```'s node type must be ```Message```(exclude subClass or implementation class). if you use ```List<GenericMessage>  msgList =  new ArrayList<>();``` to invoke the method, it will be call the```syncSend(String destination, Object payload, long timeout)```,even the class```GenericMessage``` implement ```Message```.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services