Showing results for 
Search instead for 
Did you mean: 

Obtain named queue creates another queue

Hi all.


This is a cross post from the Actor Framework section.  It's not specifically AF related so I thought I'd post it here to get some more opinions.


I'm using the Extensible Session Framework to manage access to my application's config file.  At the core of this framework is a queue.  When I start up the app, I create a named queue.  Each actor that launches after that needs to obtain a reference to that queue.  Problem is, when I try to obtain the queue the second time it's instead creating a new queue with a new refnum.  This of course breaks everything.  The attached execution trace screenshots show the named queue being created twice. 


ESF Queue Issue 1.png


ESF Queue Issue 2.png


Any idea what could be causing this behavior?

0 Kudos
Message 1 of 5

Are you sure you have created a new queue?


I know that if you obtain another queue, it creates a new refnum.  But both refnums refer to the same named queue.


Read the detailed help on Release Queue and you'll see how the Force Destroy?  input causes it to destroy the queue and kill all of the references to it.

0 Kudos
Message 2 of 5

They refer to the same named queue but a different refnum.  The hex refnum at the end of the queue name is different, indicating a new queue was created.  I also had a probe on the Created New? output of the second Obtain Queue and registered TRUE.

0 Kudos
Message 3 of 5

Are you sure the names were EXACTLY the same?  End Of Lines, spaces, etc. like to sneak in there every once in awhile.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5

Yep they were exactly the same. Here's what was going on: The project is built with Actor Framework. I was obtaining the queue in the Read Config method of the root actor. I was calling that in the Launch App vi BEFORE the Launch Root Actor vi. Launch Root Actor launches the actor using VI server. Queues cannot be used to communicate across application boundaries, so when I tried to obtain the second queue, it correctly determined that the queue did not exist. They both show up in the execution trace because I was doing a trace on the entire project. I changed the Read Config method in my root actor to create a one time use config refnum that is closed at the end of the method, then moved the Obtain Queue to the Pre Launch Init method. This worked perfectly. Thanks everyone. Link to other post:

0 Kudos
Message 5 of 5