1 / 10

AirVantage M2M Cloud Data Push Introduction

AirVantage M2M Cloud Data Push Introduction. AMQP - Presentation. AMQP provides store-and-forward transactional messaging, high-performance publish and subscribe event notification mechanism

leland
Download Presentation

AirVantage M2M Cloud Data Push Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AirVantage M2M Cloud Data Push Introduction

  2. AMQP - Presentation • 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) Sierra Wireless Proprietary and Confidential

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

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

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

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

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

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

  9. Example code: RabbitMQConsumer.java +++++++++++++++++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; Sierra Wireless Proprietary and Confidential

  10. RabbitMQConsumer.java (2) 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(); } } Sierra Wireless Proprietary and Confidential

More Related