Results 1 to 3 of 3
  1. #1

    Problem with multiple subscribe

    I'm trying to write a multiple subscribe using http (C++ Builder, TLCP protocol), as explained in page 30 of protocol specification:


    PARAMS: LS_cid=mgQkwtwdysogQz2BJ4Ji+kOj2Bg\r\nLS_adapter_s et=DEMO\r\n

    R: HTTP/1.0 200 OK

    Server: Lightstreamer-Server/7.1.0 b4 build 1915 (Lightstreamer Server - ENTERPRISE edition
    Content-Type: text/enriched; charset=UTF-8
    Cache-Control: no-store
    Cache-Control: no-transform
    Cache-Control: no-cache
    Pragma: no-cache
    Expires: Thu, 1 Jan 1970 00:00:00 GMT
    Date: Fri, 10 May 2019 17:35:25 GMT
    Content-Length: 500000
    Connection: Keep-Alive
    x-accel-buffering: no

    CONEXAO OK -> CONOK,S6c80fb278aabaef7M14aT3525526,50000,5000,*


    LS_reqId=1&LS_op=add&LS_subId=1&LS_group=item1&LS_ schema=stock_name+last_price+time+bid+ask&LS_data_ adapter=QUOTE_ADAPTER&LS_mode=MERGE\r\nLS_reqId=2& LS_op=add&LS_subId=2&LS_group=item2&LS_schema=stoc k_name+last_price+time+bid+ask&LS_data_adapter=QUO TE_ADAPTER&LS_mode=MERGE\r\nLS_reqId=3&LS_op=add&L S_subId=3&LS_group=item3&LS_schema=stock_name+last _price+time+bid+ask&LS_data_adapter=QUOTE_ADAPTER& LS_mode=MERGE\r\n

    R: 200 REQOK,3

    It's subscribing only the last item, even if trying with different number of items.

    U,3,1,Bagies Consulting|6.7|19:35:28|6.69|6.7

    I tried some variations, like sending LS_cid and LS_adapter_set in the subscription url, but results are the same.


    1. This is intended to work this way or I've misunderstood the specification ?
    2. What I'm doing wrong ?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2012
    Hi rperseguini,

    I can confirm that you have understood the specifications correctly, multiple requests are possible and must be specified in this way, separating the various requests with CR LF characters into the same http command.

    I suppose what happens in your tests is that the end-of-line characters are somehow encoded by the http client tool and therefore not correctly recognized by the server, which processes the received request as a single one.

    This is the test I run with cURL client in linux env (and worked as expected):

    curl -v -N -X POST -d "LS_cid=mgQkwtwdysogQz2BJ4Ji+kOj2Bg&LS_adapter_set=DEMO"
    curl -v -N -X POST --data $'LS_reqId=4&LS_op=add&LS_subId=4&LS_group=item4&LS_schema=stock_name+last_price+time+bid+ask&LS_data_adapter=QUOTE_ADAPTER&LS_mode=MERGE&LS_session=S52d7edf672d5067aM14aT1911842\r\nLS_reqId=5&LS_op=add&LS_subId=5&LS_group=item5&LS_schema=stock_name+last_price+time+bid+ask&LS_data_adapter=QUOTE_ADAPTER&LS_mode=MERGE&LS_session=S52d7edf672d5067aM14aT1911842'

  3. #3
    Hello Giuseppe.

    That's it.
    I solved this by manually encoding the subscription lines and adding CR LF for each line later.

    It's working now.
    Thank you very much.

    Best regards,
    Last edited by rperseguini; May 13th, 2019 at 03:13 PM.



Similar Threads

  1. Problem with multiple subscribe
    By rperseguini in forum Client SDKs
    Replies: 0
    Last Post: May 10th, 2019, 07:00 PM
  2. Running Lightstreamer with multiple Adapters problem
    By HassanShehata in forum Adapter SDKs
    Replies: 1
    Last Post: May 24th, 2016, 08:31 AM
  3. problem in command subscribe
    By engcoder in forum Client SDKs
    Replies: 7
    Last Post: January 27th, 2016, 05:27 PM
  4. Replies: 3
    Last Post: July 29th, 2009, 09:27 AM
  5. Data Adapter's subscribe() method not getting called
    By CitiMan in forum Adapter SDKs
    Replies: 8
    Last Post: November 30th, 2006, 04:26 PM

Tags for this Thread


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 06:41 PM.