पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.0.1

dart_amqp_client

AMQP (उन्नत संदेश भंडारण प्रोटोकॉल) कनेक्शन, चैनल और संबंधित कॉलबैक के संभालने को सरल बनाने वाला डार्ट पैकेज।

AndroidiOSmacOSWindowsLinux
30-दिन डाउनलोड
105
लाइक
13
Pub अंक
145

पैकेज इंस्टॉल करें

flutter pub add dart_amqp_client

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक डार्ट पैकेज जो AMQP (उन्नत संदेश भंडारण प्रोटोकॉल) संचार को सरल बनाता है, जिससे प्लेटफॉर्म के बीच विश्वसनीय रियल-टाइम संदेशवाहक संचार सुनिश्चित होता है। यह संपर्क प्रबंधन, चैनल हैंडलिंग और संदेश-आधारित एप्लिकेशन के लिए कॉलबैक निष्पादन को सरल बनाता है। चैट सिस्टम, लाइव स्ट्रीमिंग इंटीग्रेशन या किसी भी विश्वसनीय डेटा आदान-प्रदान के लिए जिसमें मजबूत कतार और डिलीवरी गारंटी की आवश्यकता हो, उनके लिए आदर्श है। इस पैकेज का समर्थन एंड्रॉइड, आईओएस, मैकओएस, विंडोज और लिनक्स सहित कई प्लेटफॉर्म के लिए है।

उपयोग

  • रियल-टाइम चैट एप्लिकेशन्स
  • लाइव स्ट्रीमिंग इवेंट प्रसारण
  • संदेश भंडारण एकीकरण
  • आईओटी उपकरण संचार
  • घटना-आधारित बैकएंड सेवाएँ

मुख्य विशेषताएँ

  • सरलीकृत AMQP कनेक्शन हैंडलिंग
  • एम्बेडेड चैनल प्रबंधन
  • असिंक्रोनस कॉलबैक समर्थन
  • प्लेटफॉर्म के अनुकूलता
  • टिकाऊ त्रुटि संभाल

इनके लिए उपयुक्त

  • वास्तविक समय के ऐप बना रहे विकासकर्मी
  • AMQP-आधारित संदेश प्रणाली का उपयोग करने वाली टीमें
  • विश्वसनीय संदेश डिलीवरी की आवश्यकता वाले प्रोजेक्ट
  • मोबाइल और डेस्कटॉप रियल-टाइम संचार
  • आईओटी और बैकएंड सेवा एकीकरण

विचार योग्य बातें

  • एक AMQP ब्रोकर की आवश्यकता है (उदाहरण के लिए, RabbitMQ)
  • परिपक्व विकल्पों की तुलना में सीमित दस्तावेज़ीकरण
  • उच्च थ्रूपुट परिदृश्य के लिए अनअनुकूलित
  • बाहरी ब्रोकर की उपलब्धता पर निर्भर करता है
  • उत्पादन उपयोग के लिए अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Dart AMQP Client

Dart AMQP Client is a Dart package that simplifies the handling of AMQP (Advanced Message Queuing Protocol) connections, channels, and associated callbacks.

Features

Connection Management: Automatically handles AMQP connection establishment and reconnection. Callback Support: Define custom callbacks for connection events, such as when the connection is established or encounters an error. Reconnection Control: Configure the maximum number of reconnection attempts for robust AMQP connections. Simple Integration: Easily integrate the package into your Dart applications with a straightforward API.

Table of Contents

Installation

To use this package, add dart_amqp_client as a dependency in your pubspec.yaml file:

dependencies: dart_amqp_client: ^1.0.1

Then, run pub get to fetch and install the package.

Quick start

import 'package:dart_amqp_client/dart_amqp_client.dart';

void main() {
  // Create a ConnectionSettings instance with your AMQP server details.
  ConnectionSettings connectionSettings = ConnectionSettings(
    host: 'localhost',
    port: 5672,
    maxConnectionAttempts: 5, // Set the maximum connection attempts
  );

  // Create an instance of the AMQP service.
  AmqpService(connectionSettings);

  // Set callback functions for connection events.
  AmqpService.onConnected(() {
    print('Connected to AMQP server.');
    // Use the service to establish an AMQP connection.
    Client client = AmqpService.getClient();

    // ... Perform AMQP operations with the client and channel ...

    String consumeTag = "hello";
    String msg = "Hello World!";

    client.channel().then((Channel channel) {
      return channel.queue(consumeTag, durable: false);
    }).then((Queue queue) {
      queue.publish(msg);
      print(" [x] Sent $msg");
      client.close();
    });

    String queueTag = "hello";
    Channel? channel = AmqpService.getChannel();
    channel!.queue(queueTag, durable: false).then((Queue queue) {
      print(" [*] Waiting for messages in $queueTag. To Exit press CTRL+C");
      return queue.consume(consumerTag: queueTag, noAck: true);
    }).then((Consumer consumer) {
      consumer.listen((AmqpMessage event) {
        print(" [x] Received ${event.payloadAsString}");
      });
    });
  });

  AmqpService.onDisconnected(() {
    print('Disconnected from AMQP server.');
  });

  AmqpService.onError((Exception error) {
    print('An error occurred: $error');
  });
}

Examples

The [example] folder contains implementations for getting started

Contributing

Feel free to contribute

License

dart_amqp is distributed under the [MIT license]

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।