Calling JAVA guys.. Asynchronous mess... Chalanachithram.com | Topics | Search
Hide Clipart | Log Out | Register | Edit Profile

Last 30 mins | 1 | 2 | 4 hours     Last 1 | 7 Days

Chalanachithram.com DB » New TF Industry Related » Archive through November 08, 2013 » Calling JAVA guys.. Asynchronous messaging « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 43765
Registered: 01-2008
Posted From: 168.244.164.254

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 02:28 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:


putting onto the queue is synchronous.
but once you put the message, you wont have to wait for the response.
Top of pagePrevious messageNext messageBottom of page Link to this message

Goonda
Megastar
Username: Goonda

Post Number: 24113
Registered: 02-2007
Posted From: 146.18.173.101

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 01:47 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

what i would do is loop through 'x' number of times before throwing an error. if the write to queue is successful you'll get out of the loop. There is no option if the end point is down.
Sasibabu: If TDP loses next elechens, i will donate 10% of my salary to TDP

Skywalker: Bala chiru type kadu.....narasimha swamy avataram etti posani gadi pegulu medalo esukuntadu
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Hero
Username: Jalsa

Post Number: 19959
Registered: 02-2008
Posted From: 159.53.110.142

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 01:36 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

bhaiyya, check the API
http://docs.spring.io/spring/docs/3.1.4.RELEASE/javadoc-api/ org/springframework/jms/core/JmsTemplate.html

Yes, if we want to write a message we create a Runnable class and get it done.
Top of pagePrevious messageNext messageBottom of page Link to this message

Kimura
Side Hero
Username: Kimura

Post Number: 2018
Registered: 07-2010
Posted From: 159.45.71.13

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 01:33 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

npa .. use camel. It will help you manage the 2 threads you need.. it will be simple to setup...
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14537
Registered: 05-2007
Posted From: 166.147.120.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 01:26 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Jalso bro .,

Calling jmstemplate. ConvertAndSend() method to write to the queue..
Do you use jmstemplate as well

So solution is to create a seperation thread manually .. Or can anything be done using spring .. Meeru ela implement chesar
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Hero
Username: Jalsa

Post Number: 19958
Registered: 02-2008
Posted From: 159.53.78.141

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 01:16 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

//Threading antha spring framework will take care.. Explicit ga no code required//

No. We use Spring JmsTemplate too. How does it know to use asynchrous posting of messages? When you call the spring template method, it's just like any other method - like spring's hibernateTemplate methods.
Top of pagePrevious messageNext messageBottom of page Link to this message

Dreamcatcher
Side Hero
Username: Dreamcatcher

Post Number: 4749
Registered: 11-2009
Posted From: 208.86.145.68

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:52 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:

Guys,exception ni catch cheshi edaina cheyotchu .. Kaani if the broker is down.. The exception itself will be thrown after the scheduled timeout of 10 secs is reached.. So even after having exception handler, process will still have to wait 10 secs




for you to truly accomplish this as 'asynchronously', you have to implement a separate thread that handles writing messages to the queue and invoke that thread to write your message and your main process will move on irrespective of what happens to the message.
Top of pagePrevious messageNext messageBottom of page Link to this message

Botsa_fan
Junior Artist
Username: Botsa_fan

Post Number: 114
Registered: 07-2013
Posted From: 158.48.133.1

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:49 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

oka mukka ardha keldu..but messaging ardham ayyindi,aschnorous ardham ayyindi..spring,fuse,bolt entivayya ivi anni..s/w enginners ki spring fuse tho pani eti :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14536
Registered: 05-2007
Posted From: 166.147.120.23

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:47 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Jalsa bro..

Using spring jms to write messages to a fuse queue..

Threading antha spring framework will take care.. Explicit ga no code required
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Hero
Username: Jalsa

Post Number: 19957
Registered: 02-2008
Posted From: 159.53.46.140

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:39 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

NPA,
How are you posting the message to queue? Do you have a Runnable or Thread class in which you do this? If yes, then what's your concern about not being asynchronous? The runnable will be running in a different thread anyway.
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14535
Registered: 05-2007
Posted From: 166.147.120.21

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:35 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Guys,exception ni catch cheshi edaina cheyotchu .. Kaani if the broker is down.. The exception itself will be thrown after the scheduled timeout of 10 secs is reached.. So even after having exception handler, process will still have to wait 10 secs
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 23916
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:32 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

if you dont want to wait in case of error, eat the exception and return
but that would be counter productive not sure if that is intended
Top of pagePrevious messageNext messageBottom of page Link to this message

Cyberabadsinnodu
Side Hero
Username: Cyberabadsinnodu

Post Number: 9694
Registered: 02-2010
Posted From: 63.88.24.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:30 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:


fuse queue is nothing but activeMQ right? settings lo ekkado untundi fuse queues mgmt admin lo
Akali teerindhi gadha ani adukkodam maesthama swami
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Hero
Username: Jalsa

Post Number: 19956
Registered: 02-2008
Posted From: 159.53.78.141

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:29 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

NPA, both are saying the same.
Gotcha is telling you to add like a "exception handler" which handles the event of your program not being able to write to a queue and take appropriate action - like sending a notification/email or something.
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14534
Registered: 05-2007
Posted From: 166.147.120.34

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:27 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Gotcha and last avatar bedars, iddar opposite chepthunara
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Gotcha
Hero
Username: Gotcha

Post Number: 13151
Registered: 02-2008
Posted From: 8.19.193.14

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:24 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:


2nd statement is true but u should handle that asynchronous event completed and do the needy when error happens.
This Andhra real estate is for sale.
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14533
Registered: 05-2007
Posted From: 166.147.120.34

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:19 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

We have a timeout of 10 secs to write to the queue.. And let's say I gave wrong port number in queue URL for testing..

Now shld my asynchronous process wait 10 secs and then throw an error saying cannot connect to the queue or shld my process just fire an event to write to the queue and not care if it was written to the queue successfully or not.. In that cases process will not have to wait 10 secs and it won't even throw an error..

Which among these 2 is an asynchronous process
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Last_avataar
Junior Artist
Username: Last_avataar

Post Number: 695
Registered: 09-2012
Posted From: 12.10.219.227

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:17 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:




Ante this behaviour is quite Normal for any process including asynchronous.
it ends only after successful wirting to input queue
Top of pagePrevious messageNext messageBottom of page Link to this message

Last_avataar
Junior Artist
Username: Last_avataar

Post Number: 694
Registered: 09-2012
Posted From: 12.10.219.227

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:16 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:




Yes Sir. that is obvious
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14531
Registered: 05-2007
Posted From: 166.147.120.23

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:15 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Last avatar,

Mee last line ardham kaledu
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14530
Registered: 05-2007
Posted From: 166.147.120.23

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:14 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Bedars ,

Queue lo write cheyyagane process end avuddhi.. Agreed.. But what if issues arise while writing to the queue in the first place... Shld an ashynchtous process be delayed because of these queue issues
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'
Top of pagePrevious messageNext messageBottom of page Link to this message

Katthi
Hero
Username: Katthi

Post Number: 11124
Registered: 07-2010
Posted From: 170.63.120.127

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:11 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

ledu babai.. queue lo write cheyyagane ni process end avutundi..

dani meaning ee adhi..
http://www.youtube.com/watch?v=AekjFFsznNM&feature=youtu.be

JP : Tappu antha seemandhra prajalade
Top of pagePrevious messageNext messageBottom of page Link to this message

Last_avataar
Junior Artist
Username: Last_avataar

Post Number: 692
Registered: 09-2012
Posted From: 12.10.219.227

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:11 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Yes Sir. If you cannot write a meesage to your input queue,
it means a problem with a queue manager / connectivity etc

The behaviour deosn't contradict asynchronicity
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 23913
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:09 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Npa:

But will an asynchronous process hold when when issues arise in writing to the queue


I dont know much about messaging
but here is my take
process is doing something and proceeds after it is done
how can it proceed if it is not able to do "something"?
Top of pagePrevious messageNext messageBottom of page Link to this message

Sashasaurav
Side Hero
Username: Sashasaurav

Post Number: 9760
Registered: 01-2009
Posted From: 76.187.75.209

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:09 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Kikikikikikikikikikikik .. Asynchronous messaging ani chusi egesukontu vachaaa .. tharvaatha Java ani telsi ee message kotti pothunaaa :D
To Muddam
Avunu aadu kavalsi vacchi M pattukonaaru 2009 lo .. Malli ee saari em pattukontaaru , alaa pattukonte Muddam vacchi em pattukontaadu ikkadaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Npa
Hero
Username: Npa

Post Number: 14529
Registered: 05-2007
Posted From: 166.147.120.48

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 07, 2013 - 12:06 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Working on a service which creates an entity and it also involves writing a message to a fuse queue . We are trying to do this asynchronously..

Now if the queue to which we are writing has issues. If the process was truly asynchronous , it shld not have delayed the whole process right? Curretly, the process waits until the message is written to the queue . Is this truly asynchronous

AFAIK, asynchronous messaging ante we write to a queue and don't care when that MSG is picked up by another reciever.. But will an asynchronous process hold when when issues arise in writing to the queue
Dil se....Hyderabadi hun main...Telugu Dubbing ollaki ...'Manassu tho...nenu Hyderabadi ni'

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x946f320){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: