RxJava Observable alternative to create in async call
<p>I listened to this talk
<a href="https://www.youtube.com/watch?v=QdmkXL7XikQ&amp;feature=youtu.be&amp;t=274" rel="nofollow">https://www.youtube.com/watch?v=QdmkXL7XikQ&amp;feature=youtu.be&amp;t=274</a></p>

<p>And eared that I should avoid creating an Observable using the create method, because it doesn't handle unsubscription and backpressure automatically, but I can't find an alternative to use in the code bellow.</p>

<pre><code>compositeSubscription.add(
    Observable.create(new Observable.OnSubscribe&lt;DTOCompaniesCallback&gt;() {
        @Override
        public void call(final Subscriber&lt;? super DTOCompaniesCallback&gt; subscriber) {

            modelTrainStrike.getCompaniesFromServer(new CompaniesCallback() {
                @Override
                public void onResult(DTOCompaniesCallback dtoCompaniesCallback) {
                    try {
                        if (!subscriber.isUnsubscribed()) {
                            subscriber.onNext(dtoCompaniesCallback);
                            subscriber.onCompleted();
                        }
                    } catch (Exception e) {
                        if (!subscriber.isUnsubscribed()) {
                            subscriber.onError(e);
                        }
                    }
                }
            });

        }
    })
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe(new Action1&lt;DTOCompaniesCallback&gt;() {
        @Override
        public void call(DTOCompaniesCallback dtoCompaniesCallback) {
            Log.i("TAG", "onResult: " + dtoCompaniesCallback.getCompaniesList().size());
        }
    }, new Action1&lt;Throwable&gt;() {
        @Override
        public void call(Throwable throwable) {
            throw new OnErrorNotImplementedException("Source!", throwable);
        }
    })
);
</code></pre>

<p>And I call clear the CompositeSubscription in the OnDestroy method</p>

<pre><code>@Override
public void onDestroy() {
    if (compositeSubscription != null) {
        compositeSubscription.clear();
    }
}
</code></pre>

<p>Do you see any alternative to the create method that I could use here?
Do you see any potential danger or is this approach safe?
Thanks</p>