Results 1 to 5 of 5
  1. #1

    Question Troubles with multiple Data Providers in adapters.xml

    Guys, maybe you can help me?)
    Couldn't run Node.js adapter with multiple Data Providers, if run it only with one Data Provider - it's ok.
    Also catch exception when try run Node.js Adapter:


    /home/dzmitry/Work/mock-stream-adapter/node_modules/lightstreamer-adapter/lib/dataprotocol.js:189 throw new Error("Unexpected late " + dataMethods.DATA_INIT + " message");
    ^


    Error: Unexpected late DPI message
    at read (/home/dzmitry/Work/mock-stream-adapter/node_modules/lightstreamer-adapter/lib/dataprotocol.js:189:9)
    at Object.parse (/home/dzmitry/Work/mock-stream-adapter/node_modules/lightstreamer-adapter/lib/protocol.js:317:18)
    at Socket.handleIncomingMessage (/home/dzmitry/Work/mock-stream-adapter/node_modules/lightstreamer-adapter/lib/dataprovider.js:89:10)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:246:13)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:601:20)


    You can check my adapters.xml.

    PHP Code:
    <adapters_conf id="STREAMINGALL">   
     
      <
    metadata_provider>
            <
    adapter_class>com.lightstreamer.adapters.metadata.LiteralBasedProvider</adapter_class>
        </
    metadata_provider>

        <
    data_provider name="PRICES">
            <
    adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
            <
    classloader>log-enabled</classloader>
            <
    param name="request_reply_port">6661</param>
            <
    param name="notify_port">6662</param>
        </
    data_provider>


        <
    data_provider name="ORDERS">
            <
    adapter_class>PROXY_FOR_REMOTE_ADAPTER</adapter_class>
            <
    classloader>log-enabled</classloader>
            <
    param name="request_reply_port">7663</param>
            <
    param name="notify_port">7664</param>
        </
    data_provider>

    </
    adapters_conf
    If I delete <data_provider name="ORDERS"> </data_provider>, works fine)
    Looking forward to your reply.
    Thank you

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi patrol90,

    It seems that both data adapters are supported by the same instance of lightstreamer-adapter library, and this generates the issue.
    Please could you confirm that you run the two Data Adapters in the same nodejs process? If this is the case, could you split the two data adapters in separate processes?

    Regards,
    Giuseppe

  3. #3
    Great thanks Giuseppe.

    Yes, I run both of it in one nodejs process.
    I have just tested your solution it's works fine!
    Is this issue unpossible to add this opportunity to lightstreamer-adapter library (run few data adapters in one process) ?

    Best wishes!

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi patrol90,

    We need to further analyze the issue in order to figure out if it something that we can fix or not.

    Regards,
    Giuseppe

  5. #5
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Hi patrol90,
    We have found and fixed the bug.
    You can now find the new release 1.4.2 on npm.
    Thank you for the cooperation.

 

 

Similar Threads

  1. Multiple Data/Metadata Adapters
    By odeheurles in forum Adapter SDKs
    Replies: 6
    Last Post: January 26th, 2015, 10:50 AM
  2. Replies: 3
    Last Post: March 5th, 2011, 12:35 AM
  3. adapters.xml
    By Pradeep Chahal in forum Adapter SDKs
    Replies: 1
    Last Post: April 26th, 2010, 03:50 PM
  4. multiple data adapters
    By rd2008 in forum Client SDKs
    Replies: 2
    Last Post: January 7th, 2009, 03:28 PM
  5. question about adapters.xml
    By quanhm in forum General
    Replies: 2
    Last Post: December 13th, 2007, 02:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 11:48 AM.