restart service via service proxy

classic Classic list List threaded Threaded
2 messages Options
mvolkomorov mvolkomorov
Reply | Threaded
Open this post in threaded view

restart service via service proxy


I used a custom bean with properties for kafka streamer service at ignite config.xml:
   <bean id="kafkaConsumerProperties"
        <property name="singleton" value="true"/>
        <property name="properties">
                <prop key="bootstrap.servers">localhost:9092</prop>
                <prop key="auto.offset.reset">latest</prop>
                <prop key="">true</prop>
                <prop key="">ignite-consumer-group</prop>
                <prop key="key.deserializer">org.apache.kafka.common.serialization.StringDeserializer</prop>
                <prop key="value.deserializer">org.apache.kafka.common.serialization.StringDeserializer</prop>

Injected this bean using:
@SpringResource(resourceName = "kafkaConsumerProperties")
    private transient Properties kafkaConsumerProperties;

I have an ignite service with a custom REST API (Jersey).
I am trying to implement an ignite service method that can restart another ignite service via ignite serviceProxy.
Calling this method at REST API:

class RESTController {

// some REST method signature here
Ignite ignite = Ignition.ignite();
RESTService restService =,
            RESTService.class, false);


public class RESTServiceImpl implements RESTService {

public void restartMyService(String serviceName) {;, new KafkaConsumerService());

My error at method call:

[2020-07-28 14:58:32,123][ERROR][services-deployment-worker-#70][IgniteServiceProcessor] Failed to initialize service (service will not be deployed): KafkaCDRConsumerServiceorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'kafkaConsumerProperties' available

I believe that deployNodeSingleton() can't see @SpringResource injection. I guess that proxyService calls operated at Ignite context. What are the reasons? Is there a way to restart my service with injections?
akurbanov akurbanov
Reply | Threaded
Open this post in threaded view

Re: restart service via service proxy