Doesn’t work how? Doesn’t compile? Doesn’t connect? Doesn’t create the cache? 
Is there an error? 

> On 16 Nov 2020, at 09:57, Wolfgang Meyerle <[email protected]> 
> wrote:
> 
> Hi,
> 
> I tried using the cpp thin client example from the Apache ignite site to 
> create a small thin client connection example to one of the running Apache 
> Ignite cluster nodes.
> 
> However it doesn't work and I'm out of a clue.
> 
> I added the following bean to my persistence configuration file:
> 
> <bean class="org.apache.ignite.configuration.IgniteConfiguration" 
> id="ignite.cfg">
>    <property name="clientConnectorConfiguration">
>        <bean 
> class="org.apache.ignite.configuration.ClientConnectorConfiguration">
>            <property name="port" value="10800"/>
>        </bean>
>    </property>
> </bean>
> 
> 
> 
> I restarted the cluster node without any issues.
> A netcat localhost 10800 is able to start a connection to the node so I 
> assume the problem is on the cpp code side.
> 
> I used the code sample from the website, but modified the port:
> 
> #include <ignite/thin/ignite_client.h>
> #include <ignite/thin/ignite_client_configuration.h>
> 
> using namespace ignite::thin;
> 
> int main(int argc, char**argv)
> {
>    IgniteClientConfiguration cfg;
> 
>    //Endpoints list format is "<host>[port[..range]][,...]"
>    cfg.SetEndPoints("127.0.0.1:10800");
> 
>    IgniteClient client = IgniteClient::Start(cfg);
> 
>    cache::CacheClient<int32_t, std::string> cacheClient =
>        client.GetOrCreateCache<int32_t, std::string>("TestCache");
> 
>    cacheClient.Put(42, "Hello Ignite Thin Client!");
> 
>    return 0;
> }
> 
> 
> So what's wrong here?
> 
> 
> Regards,
> 
> Wolfgang


Reply via email to