Migratiion of Queue data from HornetQ to Artemis 2.x

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
Hi ,

I am migrating from HornetQ 2.4.0 to Artemis 2.3.0. I want to migrate
messages from Queue of HornetQ to same name Queue in Artemis.  I try to use
export from HornetQ utility and try to import in Artemis . but i am not able
to migrate these messages of Queues. Please suggest me how can i achieve
this.

-Thanks in advance!

-Dharmendra



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

Erich Duda-2
Hi,

recently it has been added fix [1] to Artemis 2.x for compatibility with
Artemis 1.x exported file. Can you try to build the Artemis from master
and import the file exported by HornetQ?

Erich

[1]
https://github.com/apache/activemq-artemis/commit/da164a2074595f4f18ab35295e7624ee09f7c9f4


Dňa 15.01.2018 o 09:31 dharmendra napísal(a):

> Hi ,
>
> I am migrating from HornetQ 2.4.0 to Artemis 2.3.0. I want to migrate
> messages from Queue of HornetQ to same name Queue in Artemis.  I try to use
> export from HornetQ utility and try to import in Artemis . but i am not able
> to migrate these messages of Queues. Please suggest me how can i achieve
> this.
>
> -Thanks in advance!
>
> -Dharmendra
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
Hi Erich,

I think you are talkingabout Artemis 1.x data messages from Queue to Artemis
2.x data messages 'Queues
but I was looking utility which can migrate data available in Queues of
HornetQ to Artemis 2.x 's queues.
Basically there property changed in Hornetq to artemis activeMQ  other
messages will be lost in my case.
I want to save all those messages available in Queues of HorentQ and migrate
these to Artemis's Queue.
Please help in this issue.

Thanks !





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

Erich Duda-2
Hi Dharmendra,

I mentioned you the commit which fix migration between Artemis 1.x and
Artemis 2.x, because if Artemis 2.x is not able to read 1.x export file,
I suspect that it is not able to read HornetQ file as well. So I thought
that fix for Artemis 1.x could fix also migration from HornetQ. Did you
try it?

Can you be more specific what problems you have? Did you get some
exception during importing, or the import operation passed successfully?
Be also aware that Artemis 2.x changed addressing so the import utility
automatically removes "jms.queue" and "jms.topic" prefixes. This can be
disabled  by --legacy-prefixes option.

Erich


Dňa 22.01.2018 o 07:38 dharmendra napísal(a):

> Hi Erich,
>
> I think you are talkingabout Artemis 1.x data messages from Queue to Artemis
> 2.x data messages 'Queues
> but I was looking utility which can migrate data available in Queues of
> HornetQ to Artemis 2.x 's queues.
> Basically there property changed in Hornetq to artemis activeMQ  other
> messages will be lost in my case.
> I want to save all those messages available in Queues of HorentQ and migrate
> these to Artemis's Queue.
> Please help in this issue.
>
> Thanks !
>
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
We try to import hornetQ queue messages dump in xml and import into artemis

C:\apache-artemis-2.5.0-SNAPSHOT\bin\broker\bin>artemis data imp --port 5445
--input "C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml"
--verbose
Executing org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
data imp --port 5445 --input
C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml --verbose
Home::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT,
Instance::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT\bin\broker
2018-01-22 16:35:21,307 INFO [org.apache.activemq.artemis.core.client]
AMQ211002: Started NIO Netty Connector version 4.1.19.Final to
localhost:5445

It allows to import but When reading message:

*****************************************************
ObjectMessage with JMSMessageID =ID:239d193b-ff64-11e7-9472-ea2aea4af47f

Property : JMSXDeliveryCount = 1
Property : __HQ_CID = 317ae782-f501-11e7-9adb-27c0af9778f4

Content:
    <null> object
*****************************************************
The message available on <body> tag which is not readable and only gives
<null> . I am not able to understand why messages is not being extract from
encoded message. Is there any mechanism change while decoding/encoding
message which may be causing <null>. Please have a look.




-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

clebertsuconic
This was fixed on master.

On Mon, Jan 22, 2018 at 11:58 PM dharmendra <[hidden email]> wrote:

> We try to import hornetQ queue messages dump in xml and import into artemis
>
> C:\apache-artemis-2.5.0-SNAPSHOT\bin\broker\bin>artemis data imp --port
> 5445
> --input "C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml"
> --verbose
> Executing
> org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
> data imp --port 5445 --input
> C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml --verbose
>
> Home::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT,
>
> Instance::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT\bin\broker
> 2018-01-22 16:35:21,307 INFO [org.apache.activemq.artemis.core.client]
> AMQ211002: Started NIO Netty Connector version 4.1.19.Final to
> localhost:5445
>
> It allows to import but When reading message:
>
> *****************************************************
> ObjectMessage with JMSMessageID =ID:239d193b-ff64-11e7-9472-ea2aea4af47f
>
> Property : JMSXDeliveryCount = 1
> Property : __HQ_CID = 317ae782-f501-11e7-9adb-27c0af9778f4
>
> Content:
>     <null> object
> *****************************************************
> The message available on <body> tag which is not readable and only gives
> <null> . I am not able to understand why messages is not being extract from
> encoded message. Is there any mechanism change while decoding/encoding
> message which may be causing <null>. Please have a look.
>
>
>
>
> -----
> DKumar
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
--
Clebert Suconic
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

clebertsuconic
An option is to use the importer from hornetq towards artemis.  The
importer connects to the broker using simple producers.

On Tue, Jan 23, 2018 at 8:42 AM Clebert Suconic <[hidden email]>
wrote:

> This was fixed on master.
>
> On Mon, Jan 22, 2018 at 11:58 PM dharmendra <[hidden email]>
> wrote:
>
>> We try to import hornetQ queue messages dump in xml and import into
>> artemis
>>
>> C:\apache-artemis-2.5.0-SNAPSHOT\bin\broker\bin>artemis data imp --port
>> 5445
>> --input "C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml"
>> --verbose
>> Executing
>> org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
>> data imp --port 5445 --input
>> C:\sg\hq_msg_migration\hq-exported-msg\hq_msg_GlobalIn2.xml --verbose
>>
>> Home::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT,
>>
>> Instance::C:\sg\activemq-artemis-master\activemq-artemis-master\artemis-distribution\target\apache-artemis-2.5.0-SNAPSHOT-bin\apache-artemis-2.5.0-SNAPSHOT\bin\broker
>> 2018-01-22 16:35:21,307 INFO [org.apache.activemq.artemis.core.client]
>> AMQ211002: Started NIO Netty Connector version 4.1.19.Final to
>> localhost:5445
>>
>> It allows to import but When reading message:
>>
>> *****************************************************
>> ObjectMessage with JMSMessageID =ID:239d193b-ff64-11e7-9472-ea2aea4af47f
>>
>> Property : JMSXDeliveryCount = 1
>> Property : __HQ_CID = 317ae782-f501-11e7-9adb-27c0af9778f4
>>
>> Content:
>>     <null> object
>> *****************************************************
>> The message available on <body> tag which is not readable and only gives
>> <null> . I am not able to understand why messages is not being extract
>> from
>> encoded message. Is there any mechanism change while decoding/encoding
>> message which may be causing <null>. Please have a look.
>>
>>
>>
>>
>> -----
>> DKumar
>> --
>> Sent from:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>>
> --
> Clebert Suconic
>
--
Clebert Suconic
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
It worked for me when i took code from master.
Thanks a lot Clebert for your support!






-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
Hi ,

today i tried the same on production server means export form hornetq 2.4.x
messages and try to import that file using artemis 2.4 import command as
given in above discussion. All of sudden i am getting this error
$ ./artemis.cmd data imp --port 5445 --input
"C:\SG\ArtimisMQ\hornetq_msg.xml" --verbose
Executing org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
data imp --port 5445 --input C:\SG\ArtimisMQ\hornetq_msg.xml --verbose
Home::C:\SG\ArtimisMQ\apache-artemis-2.4.0,
Instance::C:\SG\ArtimisMQ\apache-artemis-2.4.0\bin\SGbroker
*java.lang.String cannot be cast to java.lang.Number*

usage: artemis <command> [<args>]

The most commonly used artemis commands are:

Please reply,is there anything changed in tags?  thanks !




-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

Erich Duda-2
Hi,

there are bugs in Artemis 2.4 which are fixed in master and they are not
released yet. However release of Artemis 2.5 should be soon, see [1].

Erich

[1]
http://activemq.2283324.n4.nabble.com/DISCUSS-HEADS-UP-Release-Time-Artemis-td4735712.html


Dňa 01.02.2018 o 08:36 dharmendra napísal(a):

> Hi ,
>
> today i tried the same on production server means export form hornetq 2.4.x
> messages and try to import that file using artemis 2.4 import command as
> given in above discussion. All of sudden i am getting this error
> $ ./artemis.cmd data imp --port 5445 --input
> "C:\SG\ArtimisMQ\hornetq_msg.xml" --verbose
> Executing org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
> data imp --port 5445 --input C:\SG\ArtimisMQ\hornetq_msg.xml --verbose
> Home::C:\SG\ArtimisMQ\apache-artemis-2.4.0,
> Instance::C:\SG\ArtimisMQ\apache-artemis-2.4.0\bin\SGbroker
> *java.lang.String cannot be cast to java.lang.Number*
>
> usage: artemis <command> [<args>]
>
> The most commonly used artemis commands are:
>
> Please reply,is there anything changed in tags?  thanks !
>
>
>
>
> -----
> DKumar
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
Thanks Enrich for the update and please let us know when 2.5.x version will
be available.

Apart from it I ran artemis server and it suddenly down after 10 hours
running with below exception
13:16:22,551 ERROR [org.apache.activemq.artemis.core.server] AMQ224018:
Failed to create session:
ActiveMQSessionCreationException[errorType=SESSION_CREATION_REJECTED
message=AMQ119034: Server not started]
at
org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQPacketHandler.handleCreateSession(ActiveMQPacketHandler.java:138)
[artemis-server-2.4.0.jar:2.4.0]

Please suggest why this is occuring frequently.

-Thanks
Dharmendra



-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
I debug lot but not able to find why this error comes if all things fine
2018-02-02 14:10:45,226 ERROR rejectedExecution Failed to submit a listener
notification task. Event loop shut down?
java.util.concurrent.RejectedExecutionException: event executor terminated




-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

Erich Duda-2
What version of artemis server you ran? Artemis 2.4 or master?
> 13:16:22,551 ERROR [org.apache.activemq.artemis.core.server] AMQ224018:
> Failed to create session:
> ActiveMQSessionCreationException[errorType=SESSION_CREATION_REJECTED
> message=AMQ119034: Server not started]
This says that server was stopped and because of that the session could
not be created. Isn't there any exception earlier? We should find a root
cause why the server was stopped.

Erich
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

dharmendra
I am running Artemis 2.4 version.



-----
DKumar
--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
DKumar
Reply | Threaded
Open this post in threaded view
|

Re: Migratiion of Queue data from HornetQ to Artemis 2.x

Erich Duda-2
Did you manage to find some earlier exception which could cause that the
server was stopped? For example, if Artemis is not able to finish some
disk operation in timeout, it shutdowns itself. Try to find the first
ERROR in the log.

Can you try the same scenario with Artemis master? Maybe the issue was
already fixed.

Thanks

Erich


Dňa 06.02.2018 o 04:57 dharmendra napísal(a):
> I am running Artemis 2.4 version.
>
>
>
> -----
> DKumar
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html