<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi" -->

---
title: Attaching multiple services to the same listener in...
description: Learn how to attach multiple services to the same listener in Ballerina by either referring to a listener declaration or initializing the listener in-line.
canonical: https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Attaching multiple services to the same listener in Ballerina | daily.dev
og:description: Learn how to attach multiple services to the same listener in Ballerina by either referring to a listener declaration or initializing the listener in-line.
og:url: https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi
og:image: https://api.daily.dev/og/posts/y8KeviYmI.png
og:image:alt: Attaching multiple services to the same listener in Ballerina
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Attaching multiple services to the same listener in Ballerina

**[Ballerina](https://daily.dev/sources/ballerina)** · 2 min read · 0 upvotes · 0 comments

## Summary

Learn how to attach multiple services to the same listener in Ballerina by either referring to a listener declaration or initializing the listener in-line.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/ballerina-techblog/attaching-multiple-services-to-the-same-listener-in-ballerina-f0cd0c87766d>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#rest-api](https://daily.dev/tags/rest-api), [#ballerina](https://daily.dev/tags/ballerina)

[View this post on daily.dev](https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Attaching multiple services to the same listener in Ballerina","url":"https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi"},"datePublished":"2024-02-01T04:26:28.852Z","dateModified":"2024-05-09T08:16:28.624Z","description":"Learn how to attach multiple services to the same listener in Ballerina by either referring to a listener declaration or initializing the listener in-line.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7396463b9ed58295793a917ac434b93f?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7396463b9ed58295793a917ac434b93f?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Ballerina","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ballerina","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/958d0f92bff045eba8128ea4fac00fb4","url":"https://daily.dev/sources/ballerina"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/attaching-multiple-services-to-the-same-listener-in-ballerina-y8keviymi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rest-api,ballerina","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ballerina","item":"https://daily.dev/sources/ballerina"},{"@type":"ListItem","position":3,"name":"Attaching multiple services to the same listener in Ballerina"}]}
```

