java - ActiveMQ : queue VS temporaryQueue -
i using activemq in order communicate between servers.
every server holds 1 queue in order send messages , temporaryqueue per each thread in order receive messages.
when using ~>32 threads receiving
cannot publish deleted destination: temp-queue: xxx
after while.
when change temporaryqueue "regular" queue works perfectly.
(session.createqueue(...) instead of session.createtemporaryqueue())
why getting error ?
does cost more me when use "regular" queue ?
so implementing request reply using non temporary queues need way correlate response request. can use correlation-id header. since not supposed create request-unique regular queues, fixed set of queues. order.confirmation.response or similar. so, it's less costly use regular queues - if reuse them.
to read messages using multiple threads common response queue - use message selector select jmscorrelationid header particular answer.
however should able use temp queues well. problem kind of usage issue - information provided not give clues reveals no implementation or analysis.
Comments
Post a Comment