# TxQueuePoint

* a class using message queue communication as part of C2C (component-2-component data transfering).
* it include a TxConntor type member implement all the details needed to connect, send and receive data from queue.

Defining a queue point is as follow:

```
// get a new queue-point under the name 'GITHUB::GIST::C2' and save on the registry
queuepoint = TxQueuePointRegistry.instance.queue('GITHUB::GIST::C2');    
```

queuepoint (as mountpoint) objects are kept in TxQueuePointRegistry by their identifier (a selector) which could be a string as well as Symbol.

*   **C2C**

    * first define a driver (see C2C section).
    * then define a queuepoint as follow:

    ```
    queuepoint: TxQueuePoint = TxQueuePointRegistry.instance.queue('GITHUB::API::AUTH');
     
      constructor() {
      }
     
      async init() {
        await this.queuepoint.queue().connect('example-1.queuepoint', 'Q1Component.tasks');
        await this.queuepoint.queue().subscribe(
          async (data) => {
            console.log("[Q1Component:subscribe] got data = " + data);
            await this.queuepoint.queue().next('example-2.queuepoint', 'Q2Component.tasks', {from: 'example-1.queuepoint', data: 'data'});
          });
     
        return this;
      }   
      .
      .      
    ```
