Question: I want to create a web-socket source (for **spring-cloud-stream-app-starters**) which is currently not available on git hub.

I went through some of the available sources but had some confusions, may be because I'm not familiar with the framework.

Can I just create a spring boot application with `Source binding` and return the received packets from web-socket clients in an `@InboundChannelAdapter(value = Source.OUTPUT)` annotated method. ?
Also how can I use **WebSocketInboundChannelAdapter** to start a websocket server and push the packets to the underlying broker.?

Answer: 
you can do below,

extend Route from `@angular/router` and update Type of data like below,

```
export interface RouteData {
  ShowTopBar: boolean;
  ShowSideBar: boolean;
}

interface CustomRoute extends Route {
  data?: RouteData;
}

```

update type of routes to `CustomRoute[]` from `Routes`

```
const routes: CustomRoute[] = [
  { path: '', redirectTo: '/home', pathMatch: 'full' },
  { path: 'home', component: HomeComponent, data: { ShowSideBar: true, ShowTopBar: true } }
];

```

now you can pass Type safe data, see below,

[![enter image description here](https://i.stack.imgur.com/a9eWj.png)](https://i.stack.imgur.com/a9eWj.png)
Extrapolating on Madhu's answer, if you want your *entire* navigation tree to have those properties, not just the *top* level routes, you must also override the `children` property like this:

```js
interface CustomRoute extends Route {
  data?: RouteData;
  children?: CustomRoute[];
}

```

I had a similar approach to Madhu's but was wondering why my child routes did not have intellisense or type safety. Then I realized the `children` property was still set to `Routes` from the framework's definition.