Results 1 to 10 of 10

Thread: Stock trading example

  1. #1
    Join Date
    Oct 2010
    Posts
    8

    Default Stock trading example

    Hi,

    Ive had a few problems with the Stock trading example in .Net.

    The issue is with the

    model.QueueBind("APP.STOCK.MARKETDATA", "", "", false, null);

    in the initializeRabbitQueues() methods on both client and server.

    It complains about ACCESS problem.

    If I remove this line, then I can get the application to work, although only the request/reply part. Not the market data streams.

    If I add an exchange Ive already created called "GMT" of type topc, it runs, but does not stream market data.

    Could you tell me what I am doing wrong ?

  2. #2
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,
    I will take a look at this today. I had the demo working right before the release and coincidentally last week I tried it out again and also had issues with the streaming market data. Not sure what is up. What version of the rabbit broker are you using?
    Mark

  3. #3
    Join Date
    Oct 2010
    Posts
    8

    Default

    The latest version of rabbit: 2.1.1

    Thanks for your reply. I'm really interested in using Spring AMQP .Net for a greenfield project here.

    My only other concern is how to do local transactions. I saw on the java forum there is a hint it can be done on the publish side, but no example. And I see in the issue-tracking a solution has been done for the cosnsumer side for release M2....

    I really need one of those, with the hope of another to get my prototype to fly.

    Could you slip me a quick example of local transactions on the publish side ?

    Note: I dont mean distributted tx, or transaction scope. Just TxSelect, TxCommit/TxRollback around my code, that I can semi-control.

  4. #4
    Join Date
    Oct 2010
    Posts
    2

    Default

    Wait i'll look at it thoroughly first and study it first.
    Just wait for a while.
    Last edited by benjamin21open; 11-19-2010 at 03:25 AM.

  5. #5
    Join Date
    Oct 2010
    Posts
    8

    Default

    Any progress on this Mark ?

  6. #6
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Just getting to it now...sorry for the delay...
    Mark

  7. #7
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Unlike the Hello World examples where there was a separate "Spring.Amqp.HelloWorld.BrokerConfiguration" project that created the queues and exchanges. The Stock Example was doing that within the Server and Client applications themselves. This turned out to be a bad idea as the message listener container would get initialized before the queues/exchanges were declared. The quick solution is to run a seperate BrokerConfiguration project beforehand which I've attached.

    This extra setup step won't be necessary once I have the RabbitAdmin class implement the ILifecycle so that it can declare all the exchanges, queues, bindings that have been delcared in the context at the right moment in the container lifecycle.

    In the meantime, add in the attached project and run it before the stock app client and server programs. You should comment out the calls to "InitializeRabbitQueues" in the Program.cs of the Client and Server. You can also pull from the git repo to get the latest code.

    Cheers,
    Mark
    Attached Files Attached Files

  8. #8
    Join Date
    Oct 2010
    Posts
    8

    Default

    Thanks Mark,

    I needed to get Transactions working on the send side, so Ive had to take RabbitTemplate out of the spring code, and modify to enable a channel to be passed to it.

    My current task it to do something similar on the receive side.

  9. #9
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,
    Ok. Transactional support has been done on the Java version and I will be syncing it up so that we can do a M2 release in the coming week or so. If you would like to help in that effort, that would be great!
    Mark
    Last edited by Mark Pollack; 11-16-2010 at 04:06 PM.

  10. #10
    Join Date
    Oct 2010
    Posts
    8

    Default

    Great news Mark.

    The threethings missing from M1 .Net version that I need are:
    - Client transactions.
    - Receive Ack (or specifically no ack) handling. - I guess this is a way of receive "transactions".
    - Implementation of the SimpleRPC blocking call.

    If M2 has all those, Id be happy to help testing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •