You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by arunkjn <ar...@gmail.com> on 2018/06/10 07:14:07 UTC
Initialize ignite queue when node is starting
Hi,
I give my cache configuration in xml, which the node uses to initialize the
cache when starting up. I want to similarly do this for initializing ignite
queues.
what would be a substitue of -
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="my-cache"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="backups" value="1"/>
</bean>
for ignite queues
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Initialize ignite queue when node is starting
Posted by Roman Guseinov <ro...@gromtech.ru>.
Hi,
If you want to configure message queue limit, here is an example:
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="discoverySpi">
...
</property>
<property name="communicationSpi">
<bean
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
<property name="localPort" value="47100"/>
<property name="messageQueueLimit" value="1024"/>
</bean>
</property>
</bean>
Best Regards,
Roman
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
RE: Initialize ignite queue when node is starting
Posted by Stanislav Lukyanov <st...@gmail.com>.
Check out the Javadoc of the Ignite.queue() - https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/Ignite.html#queue-java.lang.String-int-org.apache.ignite.configuration.CollectionConfiguration-.
You can pass null if you don’t want to start a new queue, just get an existing one by name if it exists. The cfg parameter is even annotated as @Nullable.
Moreover, if the queue with the given name already exists, it will not be changed, the configuration will be ignored.
Stan
From: arunkjn
Sent: 14 июня 2018 г. 17:48
To: user@ignite.apache.org
Subject: RE: Initialize ignite queue when node is starting
Thanks, I meant ignite queue.
If I have initialized an ignite queue in one node, and I want to just obtain
a reference to it on the second node; there is no API to do that currently
without passing in the entire configuration. Is there something I am
missing?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
RE: Initialize ignite queue when node is starting
Posted by arunkjn <ar...@gmail.com>.
Thanks, I meant ignite queue.
If I have initialized an ignite queue in one node, and I want to just obtain
a reference to it on the second node; there is no API to do that currently
without passing in the entire configuration. Is there something I am
missing?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
RE: Initialize ignite queue when node is starting
Posted by Stanislav Lukyanov <st...@gmail.com>.
Hi,
If you mean IgniteQueue then, unfortunately, there is no way to describe it in the XML.
You have to call Ignite.queue() to create one.
Thanks,
Stan
From: arunkjn
Sent: 10 июня 2018 г. 10:14
To: user@ignite.apache.org
Subject: Initialize ignite queue when node is starting
Hi,
I give my cache configuration in xml, which the node uses to initialize the
cache when starting up. I want to similarly do this for initializing ignite
queues.
what would be a substitue of -
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="my-cache"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="backups" value="1"/>
</bean>
for ignite queues
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/