Skip to content

Commit

Permalink
Merge pull request #16 from RolandHewage/alpha5_fix_display_annotations
Browse files Browse the repository at this point in the history
Add display annotations to record types & update sample links
  • Loading branch information
abeykoon authored Jun 5, 2021
2 parents c3e9c28 + 0ec75c5 commit 176892c
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 96 deletions.
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,13 @@ You can now close the sender connection.
# Samples

1. Send and Receive Message from Queue

This is the basic scenario of sending and receiving a message from a queue. A user must create a sender connection and
a receiver connection with the azure service bus to send and receive a message. The message is passed as
a parameter to the send operation. The user can receive the Message object at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_message_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -441,12 +442,13 @@ public function main() {
```

2. Send and Receive Batch from Queue

This is the basic scenario of sending and receiving a batch of messages from a queue. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The batch message is
passed as a parameter to the send operation. The user can receive the batch message at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_batch_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_batch_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -529,12 +531,13 @@ public function main() {
```

3. Send to Topic and Receive from Subscription

This is the basic scenario of sending a message to a topic and receiving a message from a subscription. A user must
create a sender connection and a receiver connection with the azure service bus to send and receive a message.
The message is passed as a parameter to the send operation. The user can receive the Message at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -601,13 +604,14 @@ public function main() {
```

4. Send Batch to Topic and Receive from Subscription

This is the basic scenario of sending a batch of messages to a topic and receiving a batch of messages from
a subscription. A user must create a sender connection and a receiver connection with the azure service bus to send and
receive a message. The batch message is passed as a parameter with optional parameters and properties to the send operation.
The user can receive the batch message at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_batch_to_topic_and_receive_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_batch_to_topic_and_receive_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -690,12 +694,13 @@ public function main() {
```

5. Complete Message from Queue

This is the basic scenario of sending and completing a message from a queue. A user must create a sender connection and
a receiver connection with the azure service bus to send and receive a message. The message is passed as
a parameter with optional parameters and properties to the send operation. The user can complete a message from the queue.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/complete_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/complete_message_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -761,12 +766,13 @@ public function main() {
```

6. Complete Message from Subscription

This is the basic scenario of sending and completing a message from a subscription. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message is
passed as a parameter with optional parameters and properties to the send operation. The user can complete a messages from the subscription.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/complete_message_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/complete_message_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -834,13 +840,14 @@ public function main() {
```

7. Abandon Message from Queue

This is the basic scenario of sending and abandoning a message from a queue. A user must create a sender connection
and a receiver connection with the azure service bus to send and receive a message. The message is passed as
a parameter with optional parameters and properties to the send operation. The user can abandon
a single Messages & make available again for processing from Queue.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/abandon_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/abandon_message_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -912,13 +919,14 @@ public function main() {
```

8. Abandon Message from Subscription

This is the basic scenario of sending and abandoning a message from a subscription. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message is
passed as a parameter with optional parameters and properties to the send operation. The user can
abandon a single Messages & make available again for processing from subscription.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/abandon_message_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/abandon_message_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -992,14 +1000,15 @@ public function main() {
```

9. Asynchronous Consumer

This is the basic scenario of sending and listening to messages from a queue. A user must create a sender connection
and a receiver connection with the azure service bus to send and receive a message. The message body is passed as
a parameter in byte array format with optional parameters and properties to the send operation. The user can
asynchronously listen to messages from the azure service bus connection and execute the service logic based on the
message received.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/async_consumer.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/async_consumer.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1073,13 +1082,14 @@ public function main() {
```

10. Deadletter from Queue

This is the basic scenario of sending and dead lettering a message from a queue. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message is
passed as a parameter with optional parameters and properties to the send operation. The user can
abandon a single Message & moves the message to the Dead-Letter Queue.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/deadletter_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/deadletter_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1150,13 +1160,14 @@ public function main() {
```

11. Deadletter from Subscription

This is the basic scenario of sending and dead lettering a message from a subscription. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message body is
passed as a parameter with optional parameters and properties to the send operation. The user can
abandon a single Message & move the message to the Dead-Letter subscription.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/deadletter_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/deadletter_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1229,13 +1240,14 @@ public function main() {
```

12. Defer from Queue

This is the basic scenario of sending and deferring a message from a queue. A user must create a sender connection and
a receiver connection with the azure service bus to send and receive a message. The message body is passed as
a parameter \with optional parameters and properties to the send operation. The user can defer
a single Message. Deferred messages can only be received by using sequence number and return Message record.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/defer_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/defer_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1306,13 +1318,14 @@ public function main() {
```

13. Defer from Subscription

This is the basic scenario of sending and deferring a message from a subscription. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message body is
passed as a parameter with optional parameters and properties to the send operation. The user can
defer a single Message. Deferred messages can only be received by using sequence number and return Message record.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/defer_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/defer_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1385,13 +1398,14 @@ public function main() {
```

14. Renew Lock on Message from Queue

This is the basic scenario of renewing a lock on a message from a queue. A user must create a sender connection and
a receiver connection with the azure service bus to send and receive a message. The message body is passed as
a parameter with optional parameters and properties to the send operation. The user can renew
a lock on a single Message from the queue.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/renew_lock_on_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/renew_lock_on_message_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -1457,13 +1471,14 @@ public function main() {
```

15. Renew Lock on Message from Subscription

This is the basic scenario of renewing a lock on a message from a subscription. A user must create a sender connection
and a receiver connection with the azure service bus to send and receive a message. The message body is passed as
a parameter in byte array format with optional parameters and properties to the send operation. The user can renew
a lock on a single Message from the subscription.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/renew_lock_on_message_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/renew_lock_on_message_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down
12 changes: 7 additions & 5 deletions asb-ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ You can now close the receiver connection.
```

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_message_from_queue.bal

## Send and Listen to Messages from the Azure Service Bus Queue

Expand Down Expand Up @@ -302,19 +302,20 @@ You can now close the sender connection.
```

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/async_consumer.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/async_consumer.bal


# Samples:

1. Send and Receive Batch from Queue

This is the basic scenario of sending and receiving a batch of messages from a queue. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message is
passed as a parameter with optional parameters and properties to the send operation. The user can
receive the array of Message objects at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_batch_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_batch_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -395,13 +396,14 @@ public function main() {
```

2. Send to Topic and Receive from Subscription

This is the basic scenario of sending a message to a topic and receiving a message from a subscription. A user must
create a sender connection and a receiver connection with the azure service bus to send and receive a message.
The message is passed as a parameter with optional parameters and properties to the send
operation. The user can receive the Message object at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -468,4 +470,4 @@ public function main() {
```

More Samples are available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/tree/main/asb-ballerina/samples
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/tree/slalpha5/asb-ballerina/samples
12 changes: 7 additions & 5 deletions asb-ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ You can now close the receiver connection.
```

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_message_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_message_from_queue.bal

## Send and Listen to Messages from the Azure Service Bus Queue

Expand Down Expand Up @@ -302,19 +302,20 @@ You can now close the sender connection.
```

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/async_consumer.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/async_consumer.bal


# Samples:

1. Send and Receive Batch from Queue

This is the basic scenario of sending and receiving a batch of messages from a queue. A user must create a sender
connection and a receiver connection with the azure service bus to send and receive a message. The message is
passed as a parameter with optional parameters and properties to the send operation. The user can
receive the array of Message objects at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_and_receive_batch_from_queue.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_and_receive_batch_from_queue.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -395,13 +396,14 @@ public function main() {
```

2. Send to Topic and Receive from Subscription

This is the basic scenario of sending a message to a topic and receiving a message from a subscription. A user must
create a sender connection and a receiver connection with the azure service bus to send and receive a message.
The message is passed as a parameter with optional parameters and properties to the send
operation. The user can receive the Message object at the other receiver end.

Sample is available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/main/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/blob/slalpha5/asb-ballerina/samples/send_to_topic_and_receive_from_subscription.bal

```ballerina
import ballerina/log;
Expand Down Expand Up @@ -468,4 +470,4 @@ public function main() {
```

More Samples are available at:
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/tree/main/asb-ballerina/samples
https://github.com/ballerina-platform/module-ballerinax-azure-service-bus/tree/slalpha5/asb-ballerina/samples
Loading

0 comments on commit 176892c

Please sign in to comment.