There are technical challenge to register custom QueueService with hazelcast client to use it. There is no direct support with HazelCastclient to register service. Please provide a way to support it. Currently we are using hazelcast version as 3.2 for both core and client
Whenever I am trying to get the Instance of the Queue following way I get error
"No factory registered for service:xxx"
IQueue dq = client.getDistributedObject(PriorityQueueService.SERVICE_NAME, "distQ");
Note : PriorityQueueService extends QueueService
I was able to register successfully with Hz instance as a server using ServiceConfig and it works fine
final ServiceConfig serviceConfig = new ServiceConfig();
serviceConfig.setEnabled(true);
serviceConfig.setClassName(PriorityQueueService.class.getName());
serviceConfig.setName(PriorityQueueService.SERVICE_NAME);
One proposed Solution to HZ as a client and register Custom Queue is the following way. But the approach is complex and we are changing the core class of HZ client. Is there any other solution or version of HZ I can use for a better solution
1) Create a new HazelCastClient as MyClient ( we cannot extend HazelCastClient as it is final class)
2) Overload method and register the new service with ProxyManager
@Override
public <T extends DistributedObject> T getDistributedObject(String serviceName, String name,ClientProxyFactory factory) {
//proxyManager.register(serviceName,factory);
return (T) proxyManager.getProxy(serviceName, name);
}