def main():
    servicebus_client = ServiceBusClient.from_connection_string(
        conn_str=CONNECTION_STR, logging_enable=True
    )
    with servicebus_client:
        sender = servicebus_client.get_topic_sender(topic_name=TOPIC_NAME)
        with sender:
            sequence_number = schedule_single_message(sender)
            print(
                "Single message is scheduled and sequence number is {}".format(
                    sequence_number
                )
            )
            sequence_numbers = schedule_multiple_messages(sender)
            print(
                "Multiple messages are scheduled and sequence numbers are {}".format(
                    sequence_numbers
                )
            )

            sender.cancel_scheduled_messages(sequence_number)
            sender.cancel_scheduled_messages(sequence_numbers)
            print("All scheduled messages are cancelled.")