Skip to contentমূল লেখায় যান

Topic 31 · Courseটপিক 31 · Course

Publish-Subscribe

A radio station sends one signal. It does not know who listens. Anyone with a radio can tune in, and a radio that is off simply misses the show. Publish-subscribe works in a similar way for software. This comparison is the tutorial's own.

6 min read6 মিনিটে পড়া যায় · 9 sections9টি সেকশন · 5 sources5টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Publish-subscribe: one event, many copiesপাবলিশ-সাবস্ক্রাইব: একটি ইভেন্ট, অনেক কপি

Publish one event, count the copies, then lose an ack and see a duplicate.একটি ইভেন্ট পাবলিশ করুন, কপি গুনুন, তারপর একটি অ্যাক হারিয়ে ডুপ্লিকেট দেখুন।

2 min2 মিনিট7 steps7টি ধাপ
  • Publisher sendsপাবলিশার পাঠায়1
  • Listenersশ্রোতা?
answer submittedউত্তর জমা হয়েছেPublisherপাবলিশারsends 1পাঠায় 1Topicটপিক

You’ll learnআপনি শিখবেন

  • How one event reaches many subscribersএকটি ইভেন্ট কীভাবে অনেক সাবস্ক্রাইবারের কাছে পৌঁছায়
  • Why one down service blocks no oneএকটি সার্ভিস বন্ধ থাকলে কেন অন্যরা আটকায় না
  • Why a lost ack gives a duplicateঅ্যাক হারালে কেন ডুপ্লিকেট আসে
  • Why a topic beats direct sendingসরাসরি পাঠানোর চেয়ে টপিক কেন ভালো

In plain words

In publish-subscribe (pub/sub) messaging, a sender publishes an event and does not need to know which consumers receive it Source 1সোর্স 1. A broker in the middle passes the event on.

Without a broker, a sender must know every consumer, deliver to each one, and handle each failure. A new consumer then means a change in the sender Source 1সোর্স 1. A plain queue links a sender to one consumer, so many consumers need many queues Source 1সোর্স 1.

The pattern has three parts Source 1সোর্স 1:

  • An input channel, where the sender (the publisher) puts its messages.
  • One output channel for each consumer (each subscriber).
  • A mechanism, usually a message broker or event bus, that copies each message to the output channels of the interested subscribers.

In this pattern a message is a unit of data. An event is one kind of message. It reports a change or an action to other parts of the system Source 1সোর্স 1. Google Pub/Sub uses two more names. A topic is a named feed of messages. A subscription is a named entity that shows interest in the messages of one topic Source 3সোর্স 3.

সহজ English

In publish-subscribe (pub/sub), a sender publishes an event. The sender does not need to know which consumers get it. Source 1সোর্স 1 A broker in the middle passes the event on.

Without a broker, the sender must know every consumer. It must send to each one and handle each failure. A new consumer means a change in the sender. Source 1সোর্স 1 A plain queue links a sender to one consumer. So many consumers need many queues. Source 1সোর্স 1

The pattern has three parts: Source 1সোর্স 1

  • An input channel. The sender (the publisher) puts its messages here.
  • One output channel for each consumer (each subscriber).
  • A mechanism, usually a broker or event bus. It copies each message to the output channels of the subscribers that want it.

A message is a unit of data. An event is one kind of message. It tells other parts of the system about a change or an action. Source 1সোর্স 1 Google Pub/Sub uses two more names. A topic is a named feed of messages. A subscription is a named entity that shows interest in the messages of one topic. Source 3সোর্স 3

বাংলা ব্যাখ্যা

পাবলিশ-সাবস্ক্রাইব (publish-subscribe বা pub/sub) মেসেজিংয়ে একটি সেন্ডার একটি ইভেন্ট পাবলিশ করে। কোন কনজিউমার সেটি পাবে, তা সেন্ডারকে জানতে হয় না। Source 1সোর্স 1 মাঝখানের একটি ব্রোকার ইভেন্টটি এগিয়ে দেয়।

ব্রোকার না থাকলে সেন্ডারকে প্রতিটি কনজিউমার চিনতে হয়। প্রতিটির কাছে আলাদা করে পাঠাতে হয় এবং প্রতিটি ফেইলিউর সামলাতে হয়। নতুন কনজিউমার এলে সেন্ডার বদলাতে হয়। Source 1সোর্স 1 একটি সাধারণ কিউ একজন সেন্ডারকে একজন কনজিউমারের সাথে যুক্ত করে। তাই অনেক কনজিউমার থাকলে অনেক কিউ লাগে। Source 1সোর্স 1

এই প্যাটার্নের তিনটি অংশ আছে: Source 1সোর্স 1

  • একটি ইনপুট চ্যানেল। সেন্ডার (পাবলিশার, publisher) এখানে তার মেসেজ রাখে।
  • প্রতিটি কনজিউমারের (প্রতিটি সাবস্ক্রাইবারের, subscriber) জন্য একটি করে আউটপুট চ্যানেল।
  • একটি ব্যবস্থা, সাধারণত একটি মেসেজ ব্রোকার বা ইভেন্ট বাস। যে সাবস্ক্রাইবাররা মেসেজ চায়, তাদের আউটপুট চ্যানেলে এটি প্রতিটি মেসেজের কপি পাঠায়।

এই প্যাটার্নে মেসেজ হলো ডেটার একটি একক। ইভেন্ট হলো এক ধরনের মেসেজ। এটি সিস্টেমের অন্য অংশকে কোনো পরিবর্তন বা কাজের কথা জানায়। Source 1সোর্স 1 Google Pub/Sub আরও দুটি নাম ব্যবহার করে। টপিক (topic) হলো মেসেজের একটি নামযুক্ত ফিড। সাবস্ক্রিপশন (subscription) হলো একটি নামযুক্ত সত্তা, যা একটি টপিকের মেসেজে আগ্রহ দেখায়। Source 3সোর্স 3

When you need it

Azure suggests the pattern when an application must broadcast to many consumers, when the consumers are built independently, and when the sender needs no real-time reply Source 1সোর্স 1. It also fits when the systems accept eventual consistency Source 1সোর্স 1, or when the consumers may be offline at different times than the sender Source 1সোর্স 1. Google lists uses such as real-time event distribution and cache invalidation events Source 2সোর্স 2.

সহজ English

Azure suggests this pattern in several cases. An application must send to many consumers. The consumers are built independently. The sender needs no real-time reply. Source 1সোর্স 1 It also fits when the systems accept eventual consistency. Source 1সোর্স 1 It also fits when the consumers may be offline at different times than the sender. Source 1সোর্স 1 Google lists uses such as real-time event distribution and cache invalidation events. Source 2সোর্স 2

বাংলা ব্যাখ্যা

Azure কয়েকটি ক্ষেত্রে এই প্যাটার্নের পরামর্শ দেয়। একটি অ্যাপ্লিকেশনকে অনেক কনজিউমারের কাছে পাঠাতে হয়। কনজিউমারগুলো স্বাধীনভাবে তৈরি হয়। সেন্ডারের রিয়েল-টাইম রিপ্লাই লাগে না। Source 1সোর্স 1 সিস্টেমগুলো ইভেন্চুয়াল কনসিসটেন্সি (eventual consistency) মেনে নিলেও এটি মানায়। Source 1সোর্স 1 কনজিউমারগুলো সেন্ডারের চেয়ে ভিন্ন সময়ে অফলাইন থাকলেও এটি মানায়। Source 1সোর্স 1 Google-এর ব্যবহার হিসেবে রিয়েল-টাইম ইভেন্ট বিতরণ এবং ক্যাশ ইনভ্যালিডেশন ইভেন্টের মতো উদাহরণ দেয়। Source 2সোর্স 2

How it works

Google Pub/Sub shows the flow well. This is one product, but the steps explain the general idea Source 3সোর্স 3:

  1. A publisher sends a message to a topic.
  2. The message is written to storage.
  3. Pub/Sub sends the message on to every subscription attached to the topic.
  4. A subscription hands the message to a subscriber application.
  5. The subscriber sends an acknowledgment (ack) after it processes the message.
  6. When at least one subscriber of each subscription has acked, Pub/Sub deletes the message.

Fan-out. Each subscription gets its own copy of every message Source 3সোর্স 3. Subscribers inside one subscription share the work, and each gets a subset. A subscription with one subscriber sends that subscriber everything Source 3সোর্স 3. A subscription must exist before it can receive messages. It only gets messages that were published after it was created Source 4সোর্স 4.

Choosing what you receive. Subscribers usually need only some messages. A broker can use topics, where each topic has its own output channel. It can also use content filtering, where the broker looks inside the message Source 1সোর্স 1. Broad topics are simpler, but subscribers filter more Source 1সোর্স 1.

Delivery style. In Google Pub/Sub a subscription can be pull (the subscriber asks) or push (the server calls the subscriber) Source 4সোর্স 4.

সহজ English

Google Pub/Sub shows the flow well. It is one product. But the steps explain the general idea. Source 3সোর্স 3

  1. A publisher sends a message to a topic.
  2. The message is written to storage.
  3. Pub/Sub sends the message to every subscription on the topic.
  4. A subscription gives the message to a subscriber application.
  5. The subscriber sends an acknowledgment (ack) after it processes the message.
  6. When at least one subscriber of each subscription has sent an ack, Pub/Sub deletes the message.

Fan-out. Each subscription gets its own copy of every message. Source 3সোর্স 3 Subscribers in one subscription share the work. Each gets a part of the messages. A subscription with one subscriber sends that subscriber everything. Source 3সোর্স 3 A subscription must exist before it can get messages. It gets only the messages that were published after it was created. Source 4সোর্স 4

Choosing what you receive. Subscribers usually need only some messages. A broker can use topics. Each topic has its own output channel. A broker can also use content filtering. Then the broker looks inside the message. Source 1সোর্স 1 Broad topics are simpler, but subscribers must filter more. Source 1সোর্স 1

Delivery style. In Google Pub/Sub, a subscription can be pull or push. In pull, the subscriber asks. In push, the server calls the subscriber. Source 4সোর্স 4

বাংলা ব্যাখ্যা

Google Pub/Sub প্রবাহটি ভালোভাবে দেখায়। এটি একটি নির্দিষ্ট প্রোডাক্ট, কিন্তু ধাপগুলো সাধারণ ধারণাটি বোঝায়। Source 3সোর্স 3

  1. একটি পাবলিশার একটি টপিকে মেসেজ পাঠায়।
  2. মেসেজটি স্টোরেজে লেখা হয়।
  3. Pub/Sub মেসেজটি টপিকের প্রতিটি সাবস্ক্রিপশনে পাঠায়।
  4. একটি সাবস্ক্রিপশন মেসেজটি একটি সাবস্ক্রাইবার অ্যাপ্লিকেশনকে দেয়।
  5. মেসেজ প্রসেস করার পর সাবস্ক্রাইবার একটি অ্যাকনলেজমেন্ট (acknowledgment বা ack) পাঠায়।
  6. প্রতিটি সাবস্ক্রিপশনের অন্তত একজন সাবস্ক্রাইবার অ্যাক পাঠালে Pub/Sub মেসেজটি মুছে ফেলে।

ফ্যান-আউট (fan-out)। প্রতিটি সাবস্ক্রিপশন প্রতিটি মেসেজের নিজস্ব কপি পায়। Source 3সোর্স 3 একই সাবস্ক্রিপশনের সাবস্ক্রাইবাররা কাজ ভাগ করে নেয়। প্রত্যেকে মেসেজের একটি অংশ পায়। যে সাবস্ক্রিপশনে একজন সাবস্ক্রাইবার, সে সবকিছু পায়। Source 3সোর্স 3 মেসেজ পাওয়ার আগে সাবস্ক্রিপশন থাকতে হয়। সাবস্ক্রিপশন তৈরির পরে পাবলিশ হওয়া মেসেজই শুধু সে পায়। Source 4সোর্স 4

কী পাবেন তা বাছাই। সাবস্ক্রাইবারদের সাধারণত কিছু মেসেজই লাগে। ব্রোকার টপিক ব্যবহার করতে পারে। প্রতিটি টপিকের নিজস্ব আউটপুট চ্যানেল থাকে। ব্রোকার কনটেন্ট ফিল্টারিংও (content filtering) ব্যবহার করতে পারে। তখন ব্রোকার মেসেজের ভেতরে দেখে। Source 1সোর্স 1 ব্যাপক টপিক সহজ, কিন্তু সাবস্ক্রাইবারদের বেশি ফিল্টার করতে হয়। Source 1সোর্স 1

ডেলিভারির ধরন। Google Pub/Sub-এ একটি সাবস্ক্রিপশন পুল (pull) বা পুশ (push) হতে পারে। পুলে সাবস্ক্রাইবার মেসেজ চায়। পুশে সার্ভার সাবস্ক্রাইবারকে কল করে। Source 4সোর্স 4

Delivery, duplicates, and order

At-least-once delivery. Azure names three guarantees. At-most-once can lose messages. At-least-once delivers every message but can create duplicates. Exactly-once removes duplicates but adds coordination cost and delay Source 1সোর্স 1. Google Pub/Sub gives at-least-once delivery by default, and it also supports exactly-once delivery as an option Source 4সোর্স 4.

Duplicates can happen when the ack step goes wrong. For example, the ack may arrive after the deadline, or a network problem may lose it. Then the message may arrive again Source 3সোর্স 3. Google also says that Pub/Sub might redeliver a message after a successful ack, for example after a server restart. It calls this rare, but possible for any message Source 4সোর্স 4. So Google says the subscriber must be idempotent Source 4সোর্স 4. Idempotent means that handling a message twice causes no harm. This definition is the tutorial's own. Azure gives the same advice when the broker has no deduplication Source 1সোর্স 1.

Ordering. Azure says the order of receipt is not guaranteed and may differ from the order of creation Source 1সোর্স 1. Some brokers offer ordered delivery inside a partition or session, but this limits scalability Source 1সোর্স 1. Google Pub/Sub has no expected order by default Source 4সোর্স 4. To get order, you set the same ordering key on related messages, publish them in the same region, and turn on ordering in the subscription Source 5সোর্স 5. The order holds only inside one key. Messages with different keys can arrive in any order Source 5সোর্স 5. A redelivery of one message also triggers redelivery of the later messages for that key Source 5সোর্স 5.

সহজ English

At-least-once delivery. Azure names three guarantees. At-most-once can lose messages. At-least-once delivers every message, but it can create duplicates. Exactly-once removes duplicates, but it adds coordination cost and delay. Source 1সোর্স 1 Google Pub/Sub gives at-least-once delivery by default. It also supports exactly-once delivery as an option. Source 4সোর্স 4

Duplicates can happen when the ack step goes wrong. For example, the ack may arrive after the deadline, or a network problem may lose it. Then the message may arrive again. Source 3সোর্স 3 Google also says that Pub/Sub might send a message again after a successful ack, for example after a server restart. It calls this rare, but possible for any message. Source 4সোর্স 4 So Google says the subscriber must be idempotent. Source 4সোর্স 4 Idempotent means that handling a message twice causes no harm. This definition is the tutorial's own. Azure gives the same advice when the broker has no deduplication. Source 1সোর্স 1

Ordering. Azure says the order of receipt is not guaranteed. It may differ from the order of creation. Source 1সোর্স 1 Some brokers offer ordered delivery inside a partition or session, but this limits scalability. Source 1সোর্স 1 Google Pub/Sub has no expected order by default. Source 4সোর্স 4 To get order, you do three things. You set the same ordering key on related messages. You publish them in the same region. You turn on ordering in the subscription. Source 5সোর্স 5 The order holds only inside one key. Messages with different keys can arrive in any order. Source 5সোর্স 5 If one message is sent again, the later messages for that key are sent again too. Source 5সোর্স 5

বাংলা ব্যাখ্যা

অ্যাট-লিস্ট-ওয়ান্স ডেলিভারি (at-least-once delivery)। Azure তিনটি গ্যারান্টির নাম বলে। অ্যাট-মোস্ট-ওয়ান্সে (at-most-once) মেসেজ হারাতে পারে। অ্যাট-লিস্ট-ওয়ান্স প্রতিটি মেসেজ পৌঁছে দেয়, কিন্তু ডুপ্লিকেট হতে পারে। এক্স্যাক্টলি-ওয়ান্স (exactly-once) ডুপ্লিকেট সরায়, কিন্তু সমন্বয়ের খরচ ও দেরি যোগ করে। Source 1সোর্স 1 Google Pub/Sub ডিফল্টভাবে অ্যাট-লিস্ট-ওয়ান্স ডেলিভারি দেয়। এটি অপশন হিসেবে এক্স্যাক্টলি-ওয়ান্স ডেলিভারিও সমর্থন করে। Source 4সোর্স 4

অ্যাক ধাপে গোলমাল হলে ডুপ্লিকেট হতে পারে। যেমন অ্যাক ডেডলাইনের পরে পৌঁছাতে পারে, অথবা নেটওয়ার্ক সমস্যায় হারিয়ে যেতে পারে। তখন মেসেজ আবার আসতে পারে। Source 3সোর্স 3 Google আরও বলে, সফল অ্যাকের পরেও Pub/Sub একটি মেসেজ আবার পাঠাতে পারে, যেমন সার্ভার রিস্টার্টের পরে। Google একে বিরল বলে, কিন্তু যেকোনো মেসেজের জন্য সম্ভব বলে। Source 4সোর্স 4 তাই Google বলে সাবস্ক্রাইবারকে আইডেমপোটেন্ট (idempotent) হতে হবে। Source 4সোর্স 4 আইডেমপোটেন্ট মানে একটি মেসেজ দুইবার হ্যান্ডেল করলে কোনো ক্ষতি হয় না। এই সংজ্ঞাটি টিউটোরিয়ালের নিজের। ব্রোকারে ডিডুপ্লিকেশন (deduplication) না থাকলে Azure একই পরামর্শ দেয়। Source 1সোর্স 1

অর্ডারিং (ordering)। Azure বলে, পাওয়ার ক্রমের কোনো গ্যারান্টি নেই। এটি তৈরির ক্রম থেকে আলাদা হতে পারে। Source 1সোর্স 1 কিছু ব্রোকার একটি পার্টিশন বা সেশনের ভেতরে ক্রম মেনে ডেলিভারি দেয়, কিন্তু এতে স্কেলেবিলিটি কমে। Source 1সোর্স 1 Google Pub/Sub-এ ডিফল্টভাবে কোনো প্রত্যাশিত ক্রম নেই। Source 4সোর্স 4 ক্রম পেতে তিনটি কাজ করতে হয়। সম্পর্কিত মেসেজে একই অর্ডারিং কী (ordering key) দিতে হয়। সেগুলো একই রিজিয়নে পাবলিশ করতে হয়। সাবস্ক্রিপশনে অর্ডারিং চালু করতে হয়। Source 5সোর্স 5 ক্রম শুধু একটি কী-র ভেতরে থাকে। আলাদা কী-র মেসেজ যেকোনো ক্রমে আসতে পারে। Source 5সোর্স 5 একটি মেসেজ আবার পাঠানো হলে ওই কী-র পরের মেসেজগুলোও আবার পাঠানো হয়। Source 5সোর্স 5

When not to use it

Azure says pub/sub may be a poor fit in these cases Source 1সোর্স 1:

  • There are only a few consumers that need very different data. The broker adds complexity with no scaling benefit.
  • You need near real-time interaction. The broker adds latency, so request-reply may fit better.
  • Consumers must process messages in a strict, guaranteed order.
  • One atomic transaction must cover the publisher and its consumers. Pub/Sub is asynchronous and eventually consistent.

Google adds that its Pub/Sub is for service-to-service communication, not for end-user or IoT clients Source 2সোর্স 2.

সহজ English

Azure says pub/sub may be a poor fit in these cases: Source 1সোর্স 1

  • There are only a few consumers, and they need very different data. The broker adds complexity with no scaling benefit.
  • You need near real-time interaction. The broker adds latency, so request-reply may fit better.
  • Consumers must process messages in a strict, guaranteed order.
  • One atomic transaction must cover the publisher and its consumers. Pub/Sub is asynchronous and eventually consistent.

Google adds that its Pub/Sub is for service-to-service communication. It is not for end-user or IoT clients. Source 2সোর্স 2

বাংলা ব্যাখ্যা

Azure বলে, এই ক্ষেত্রগুলোতে pub/sub ভালো না-ও মানাতে পারে: Source 1সোর্স 1

  • কনজিউমার মাত্র কয়েকজন, এবং তাদের একদম আলাদা ডেটা লাগে। ব্রোকার জটিলতা বাড়ায়, কিন্তু স্কেলিংয়ে কোনো সুবিধা দেয় না।
  • প্রায় রিয়েল-টাইম ইন্টারঅ্যাকশন দরকার। ব্রোকার ল্যাটেন্সি যোগ করে, তাই রিকুয়েস্ট-রিপ্লাই (request-reply) বেশি মানাতে পারে।
  • কনজিউমারদের কঠোর, নিশ্চিত ক্রমে মেসেজ প্রসেস করতে হয়।
  • পাবলিশার ও তার কনজিউমারদের সবাইকে একটি অ্যাটমিক ট্রানজেকশনের আওতায় থাকতে হয়। Pub/Sub অ্যাসিনক্রোনাস এবং ইভেন্চুয়ালি কনসিসটেন্ট।

Google আরও বলে, তাদের Pub/Sub সার্ভিস-টু-সার্ভিস যোগাযোগের জন্য। এটি এন্ড-ইউজার বা IoT ক্লায়েন্টের জন্য নয়। Source 2সোর্স 2

A real-life example

This example is the tutorial's own. An exam platform publishes an event "answer submitted" to a topic. Three subscriptions listen: grading, a confirmation email, and analytics. Each subscription gets its own copy. If the email service is down, grading still works. The analytics team can add a fourth subscription later without a change in the publisher.

After a lost ack, the email subscriber gets the same event twice. It must not send two emails.

সহজ English

This example is the tutorial's own. An exam platform publishes an event "answer submitted" to a topic. Three subscriptions listen: grading, a confirmation email, and analytics. Each subscription gets its own copy. If the email service is down, grading still works. The analytics team can add a fourth subscription later. The publisher needs no change.

After a lost ack, the email subscriber gets the same event twice. It must not send two emails.

বাংলা ব্যাখ্যা

এই উদাহরণটি টিউটোরিয়ালের নিজের। একটি পরীক্ষার প্ল্যাটফর্ম একটি টপিকে "answer submitted" ইভেন্ট পাবলিশ করে। তিনটি সাবস্ক্রিপশন শোনে: গ্রেডিং, একটি কনফার্মেশন ইমেইল এবং অ্যানালিটিক্স। প্রতিটি সাবস্ক্রিপশন নিজস্ব কপি পায়। ইমেইল সার্ভিস বন্ধ থাকলেও গ্রেডিং কাজ করে। অ্যানালিটিক্স টিম পরে চতুর্থ একটি সাবস্ক্রিপশন যোগ করতে পারে। পাবলিশারকে বদলাতে হয় না।

অ্যাক হারিয়ে গেলে ইমেইল সাবস্ক্রাইবার একই ইভেন্ট দুইবার পায়। তাকে দুটি ইমেইল পাঠালে চলবে না।

Common mistakes

সহজ English

বাংলা ব্যাখ্যা

  • ক্রম আশা করা। বিশেষ সেটিং ছাড়া মেসেজ সেন্ডারের তৈরির ক্রম থেকে আলাদা ক্রমে আসতে পারে। Source 1সোর্স 1 Source 4সোর্স 4
  • ঠিক একবার ডেলিভারি আশা করা। Google Cloud Pub/Sub ডিফল্টভাবে অ্যাট-লিস্ট-ওয়ান্স ডেলিভারি দেয়। তাই ডুপ্লিকেট হতে পারে। Source 4সোর্স 4
  • রিপ্লাই আশা করা। চ্যানেলগুলো একমুখী। Source 1সোর্স 1
  • সাবস্ক্রিপশন খুব দেরিতে তৈরি করা। Google Cloud Pub/Sub-এ নতুন সাবস্ক্রিপশন শুধু তৈরির পরে পাবলিশ হওয়া মেসেজ পায়। Source 4সোর্স 4 টপিক রিটেনশন (topic retention) চালু থাকলে একটি সাবস্ক্রিপশন সময়ে পিছিয়ে গিয়ে আগের মেসেজ রিপ্লে করতে পারে। Source 4সোর্স 4

What a tester can check

Tutorial advice

These test ideas are the tutorial's own advice, not a claim of the sources.

  • Send the same event twice. Check that the subscriber gives the same end result as for one event.
  • Change the order. Send "updated" before "created". Check that the subscriber copes, or that the design keeps order.
  • Stop one subscriber. Check that the others keep working. Start it again and check that it catches up.
  • Add a bad message. Send a malformed event. Check that it does not block the others.

সহজ English

Tutorial advice

These test ideas are the tutorial's own advice. They are not a claim of the sources.

  • Send the same event twice. Check that the subscriber gives the same end result as for one event.
  • Change the order. Send "updated" before "created". Check that the subscriber copes, or that the design keeps order.
  • Stop one subscriber. Check that the others keep working. Start it again and check that it catches up.
  • Add a bad message. Send a malformed event. Check that it does not block the others.

বাংলা ব্যাখ্যা

Tutorial advice

এই টেস্ট ধারণাগুলো টিউটোরিয়ালের নিজের পরামর্শ। এগুলো সোর্সগুলোর দাবি নয়।

  • একই ইভেন্ট দুইবার পাঠান। দেখুন, সাবস্ক্রাইবার একটি ইভেন্টের মতোই একই শেষ ফল দেয় কি না।
  • ক্রম বদলান। "created"-এর আগে "updated" পাঠান। দেখুন, সাবস্ক্রাইবার সামলাতে পারে কি না, অথবা ডিজাইন ক্রম রাখে কি না।
  • একজন সাবস্ক্রাইবার বন্ধ করুন। দেখুন, অন্যরা কাজ চালিয়ে যায় কি না। তাকে আবার চালু করে দেখুন, সে পিছিয়ে থাকা মেসেজ ধরতে পারে কি না।
  • একটি খারাপ মেসেজ দিন। একটি ভুল আকারের ইভেন্ট পাঠান। দেখুন, এটি অন্যদের আটকায় কি না।

Key words

WordMeaning
PublisherThe sender. It publishes events and does not know the consumers Source 1সোর্স 1
SubscriberA consumer that receives messages through its own output channel Source 1সোর্স 1
BrokerThe intermediary that copies each message to interested subscribers Source 1সোর্স 1
TopicIn Google Pub/Sub, a named feed of messages Source 3সোর্স 3
SubscriptionIn Google Pub/Sub, a named entity that shows interest in one topic Source 3সোর্স 3
Acknowledgment (ack)The subscriber tells Pub/Sub that it processed a message Source 3সোর্স 3
At-least-once deliveryEvery message arrives, but some may arrive more than once Source 1সোর্স 1
IdempotentThe tutorial's own definition: handling a message again causes no extra effect
Ordering keyIn Google Pub/Sub, a string that groups messages that must stay in order Source 5সোর্স 5

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    Publisher-Subscriber pattern

    Microsoft, Azure Architecture Center · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  2. [2]
    What is Pub/Sub?

    Google Cloud documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  3. [3]
    Overview of the Pub/Sub service

    Google Cloud documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  4. [4]
    Subscription overview

    Google Cloud documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  5. [5]
    Order messages

    Google Cloud documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22