apache / apache/dubbo-spring-boot-project
Need example for annotation based service with 'callback parameter' method
- Dominant language
- Java
- Stars
- 5.4k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to create a remote service, but nothing works.
```
@Service(interfaceClass = MessagingService.class, methods = {
@Method(name = "addMessageListener", arguments = {
@Argument(index = 0, callback = true)
})
})
public class MessagingServiceImpl implements MessagingService {
@Override
public void addMessageListener(MessageListener listener) {
//...
}
}
```
When consumer side call remote method addMessageListener throws exception:
```
Caused by: org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: addMessageListener, provider: dubbo://127.0.0.1:20880/com.example.api.service.MessagingService?application=dubbo-spring-boot-starter&default.generic=false&default.lazy=false&default.sticky=false&dubbo=2.0.2&generic=false&interface=com.example.api.service.MessagingService&lazy=false&methods=addMessageListener&pid=5389®ister.ip=192.168.1.103&revision=0.0.1-SNAPSHOT&side=consumer&sticky=false×tamp=1563276164135, cause: io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: Serialized class com.example.client.controller.MainController$1 must implement java.io.Serializable
io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: Serialized class com.example.client.controller.MainController$1 must implement java.io.Serializable
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.