1- import java .io .IOException ;
21import com .rabbitmq .client .ConnectionFactory ;
32import com .rabbitmq .client .Connection ;
43import com .rabbitmq .client .Channel ;
@@ -19,9 +18,7 @@ public FibonacciClient(Channel chann, String queueName){
1918 queue = queueName ;
2019 }
2120
22- public String call (String message )
23- throws java .io .IOException ,
24- java .lang .InterruptedException {
21+ public String call (String message ) throws Exception {
2522 String replyQueueName = channel .queueDeclare ().getQueue ();
2623 String corrId = UUID .randomUUID ().toString ();
2724 BasicProperties props = new BasicProperties ();
@@ -47,15 +44,13 @@ private Boolean validResponse(String response){
4744 }
4845 }
4946
50- private static Connection defaultConnection ()throws java . io . IOException {
47+ private static Connection defaultConnection () throws Exception {
5148 ConnectionFactory factory = new ConnectionFactory ();
5249 factory .setHost ("localhost" );
5350 return factory .newConnection ();
5451 }
5552
56- public static void main (String [] argv )
57- throws java .io .IOException ,
58- java .lang .InterruptedException {
53+ public static void main (String [] argv ) throws Exception {
5954
6055 Connection connection = defaultConnection ();
6156 Channel channel = connection .createChannel ();
0 commit comments