Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page AirVantage M2M Cloud Data Push Introduction 1.

Similar presentations


Presentation on theme: "Page AirVantage M2M Cloud Data Push Introduction 1."— Presentation transcript:

1 Page AirVantage M2M Cloud Data Push Introduction 1

2 Page AMQP provides store-and-forward transactional messaging, high-performance publish and subscribe event notification mechanism It reliably delivers business value messages: we can absolutely trust AMQP to get the message to its destination once receipt is acknowledged by the transport Uses TCP for reliable delivery. AMQP connections use authentication and can be protected using TLS (SSL) 2 AMQP - Presentation Sierra Wireless Proprietary and Confidential

3 Page 3 AirVantage Data Push API Principles Sierra Wireless Proprietary and Confidential Queue Consumer Publish M2M Cloud Platform M2M Data Storage M2M Cloud API 3rd-Party Hardware Agent

4 Page 4 AirVantage Data Push API Principles (2) Sierra Wireless Proprietary and Confidential Connect Message Check Ok Close Remove from Queue Acknowledge Consume M2M Cloud Platform M2M Data Storage M2M Cloud API

5 Page 5 AirVantage Data Push API Principles (3) Sierra Wireless Proprietary and Confidential Connect Acknowledge Consume # 23 # 24 # 25 Message Handling Error # 26 # 25 M2M Cloud Platform M2M Data Storage M2M Cloud API

6 Page 6 AirVantage Data Push API Principles (4) Sierra Wireless Proprietary and Confidential Connect Acknowledge Consume # 23 # 24 # 25 Error # 26 # 27 Reject Consume M2M Cloud Platform M2M Data Storage M2M Cloud API

7 Page 7 AirVantage Data Push API Principles (5) Sierra Wireless Proprietary and Confidential Connect Acknowledge Consume # 24 # 25 # 26 # 25 Client error or crash Connect M2M Cloud Platform M2M Data Storage M2M Cloud API

8 Page AMQP official site: http://www.amqp.orghttp://www.amqp.org RabbitMQ (Vmware) site: http://www.rabbitmq.com/http://www.rabbitmq.com/ Clients and developer tools in Java, Ruby, Python,.NET: http://www.rabbitmq.com/devtools.html http://www.rabbitmq.com/devtools.html 8 AMQP - Resources Sierra Wireless Proprietary and Confidential

9 Page +++++++++++++++++RabbitMQConsumer.java+++++++++++++++++++++++++++ import com.rabbitmq.client.Connection; import com.rabbitmq.client.Channel; import com.rabbitmq.client.*; public class RabbitMQConsumer { public static void main(String []args) throws Exception { ConnectionFactory factory = new ConnectionFactory(); factory.setUsername("guest"); factory.setPassword("guest"); factory.setVirtualHost("/"); factory.setHost("127.0.0.1"); factory.setPort(5672); Connection conn = factory.newConnection(); Channel channel = conn.createChannel(); String exchangeName = “AirVantageDataPushAPI"; String queueName = “myAirVantageQueue"; String routingKey = “myRoute"; boolean durable = true; 9 Example code: RabbitMQConsumer.java Sierra Wireless Proprietary and Confidential

10 Page channel.exchangeDeclare(exchangeName, "direct", durable); channel.queueDeclare(queueName, durable,false,false,null); channel.queueBind(queueName, exchangeName, routingKey); boolean noAck = false; QueueingConsumer consumer = new QueueingConsumer(channel); channel.basicConsume(queueName, noAck, consumer); boolean runInfinite = true; while (runInfinite) { QueueingConsumer.Delivery delivery; try { delivery = consumer.nextDelivery(); } catch (InterruptedException ie) { continue; } System.out.println("Message received" + new String(delivery.getBody())); channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false); } channel.close(); conn.close(); } } 10 RabbitMQConsumer.java (2) Sierra Wireless Proprietary and Confidential


Download ppt "Page AirVantage M2M Cloud Data Push Introduction 1."

Similar presentations


Ads by Google