build a module that receives a Json message

191 views
Skip to first unread message

masque130154

unread,
Jul 30, 2012, 9:42:35 AM7/30/12
to ve...@googlegroups.com
I want to develop one module that receives  Json like input and displays a message. 

this is , the source code of the module


and  this is the code source of the sender for testing:


I do not understand why the message "I received the json message" is not displayed.

Can you help me?

Tim Fox

unread,
Jul 30, 2012, 1:41:23 PM7/30/12
to ve...@googlegroups.com
Deploying of modules is asynchronous, so you are probably sending the message before your receiver module has started.

You can specify a callback to be called when the module is started, see the documentation for more information.

masque130154

unread,
Jul 31, 2012, 10:13:34 AM7/31/12
to ve...@googlegroups.com
I understand what do you mean but I didn't  find the part in the documentation that talks about that, can you help me? "Java" 

T.J. Crowder

unread,
Jul 31, 2012, 10:50:56 AM7/31/12
to ve...@googlegroups.com

On Tuesday, July 31, 2012 3:13:34 PM UTC+1, masque130154 wrote:
I understand what do you mean but I didn't  find the part in the documentation that talks about that, can you help me? "Java" 

Your pastes seem to be gone (pastebin says the IDs are unknown), so I couldn't look at your code to see what you were doing, but this should be the relevant API call:


Note the `doneHandler`. If you're using one of the other methods (deployVerticle, deployWorkerVerticle), there are variants of those with a `doneHandler` as well.

Best,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

Tim Fox

unread,
Jul 31, 2012, 10:57:03 AM7/31/12
to ve...@googlegroups.com

masque130154

unread,
Jul 31, 2012, 11:42:59 AM7/31/12
to ve...@googlegroups.com

Tim Fox

unread,
Jul 31, 2012, 11:46:10 AM7/31/12
to ve...@googlegroups.com
Why are you posting your code again?

If you can't work out what you need to do given all the documentation
that we have supplied, I'm not sure I can help you any further.

On 31/07/12 16:42, masque130154 wrote:
> http://pastebin.com/RF80sq4Y
> http://pastebin.com/UXPYVz4D
>
> Le mardi 31 juillet 2012 16:57:03 UTC+2, Tim Fox a �crit :
> <http://vertx.io/api/java/api/org/vertx/java/deploy/Container.html#deployModule%28java.lang.String,+org.vertx.java.core.json.JsonObject,+int,+org.vertx.java.core.Handler%29>
>
>
> On Tuesday, July 31, 2012 3:13:34 PM UTC+1, masque130154 wrote:
>
> I understand what do you mean but I didn't find the part in
> the documentation that talks about that, can you help me? "Java"
>
> Le lundi 30 juillet 2012 19:41:23 UTC+2, Tim Fox a �crit :
>
> Deploying of modules is asynchronous, so you are probably
> sending the message before your receiver module has started.
>
> You can specify a callback to be called when the module is
> started, see the documentation for more information.
>
> On Monday, July 30, 2012 2:42:35 PM UTC+1, masque130154
> wrote:
>
> I want to develop one module that receives Json like
> input and displays a message.
>
> this is , the source code of the module
>
> http://pastebin.com/9jji1fiE
>
> and this is the code source of the sender for testing:
>
> http://pastebin.com/AeMswMuN
>
> I do not understand why the message "I received the
> json message" is not displayed.
>
> Can you help me?
>
> --
> You received this message because you are subscribed to the Google
> Groups "vert.x" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/vertx/-/PtsubeyC-WwJ.
> To post to this group, send an email to ve...@googlegroups.com.
> To unsubscribe from this group, send email to
> vertx+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/vertx?hl=en-GB.


--
Tim Fox

Vert.x - effortless polyglot asynchronous application development
http://vertx.io
twitter:@timfox

Reply all
Reply to author
Forward
0 new messages